Skip to content

Commit 2b8ed08

Browse files
jasonacoxper1234
andauthored
Remove low-level language from this section
Co-authored-by: per1234 <accounts@perglass.com>
1 parent 69dd761 commit 2b8ed08

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

content/learn/08.contributions/03.arduino-creating-library-guide/arduino-creating-library-guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ Morse morse(13);
244244

245245
When this line gets executed (which actually happens even before the `setup()` function), the constructor for the `Morse` class will be called, and passed the argument you've given here (in this case, just 13).
246246

247-
Notice that our `setup()` now has a call to `morse.begin()` which will make a call to `pinMode()` inside the library. It is best practice to have hardware initialization calls like `pinMode()` take place in `setup()` which is why we created the `begin()` function.
247+
Notice that our `setup()` now has a call to `morse.begin()` which configure the pin that was set in the constructor.
248248

249249
Finally, to call the `dot()` and `dash()` functions, we need to prefix them with **morse**. - the name of the instance we want to use. We could have multiple instances of the `Morse` class, each on their own pin stored in the _pin private variable of that instance. By calling a function on a particular instance, we specify which instance's variables should be used during that call to a function. That is, if we had both:
250250

0 commit comments

Comments
 (0)