Skip to content

Commit 80dfeaf

Browse files
Update content/learn/08.contributions/01.arduino-library-style-guide/arduino-library-style-guide.md
Co-authored-by: per1234 <accounts@perglass.com>
1 parent 90311c7 commit 80dfeaf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

content/learn/08.contributions/01.arduino-library-style-guide/arduino-library-style-guide.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ Though there are some libraries where we pass pointers by using structures like
5555
use something like this:
5656

5757
```arduino
58-
xAxis = adxl.readX();
59-
yAxis = adxl.readY();
60-
zAxis = adxl.readZ();
58+
xAxis = adxl.readX();
59+
yAxis = adxl.readY();
60+
zAxis = adxl.readZ();
6161
```
6262

6363
When using serial communication, allow the user to specify any `Stream` object, rather than hard-coding `Serial`. This will make your library compatible with all serial ports on boards with multiple (e.g., Mega), and can also use alternate interfaces like SoftwareSerial. The Stream object can be passed to your library's constructor or to a `begin()` function (as a reference, not a pointer). See [Firmata 2.3](http://www.firmata.org/wiki/Main_Page) or [XBee 0.4](https://github.com/andrewrapp/xbee-arduino) for examples of each approach.

0 commit comments

Comments
 (0)