Nibbles and Bits
The Care and Feeding of My Pet Arduino by Budd Churchward - WB7FHC - NIBBLES AND BITS LIBRARY
«1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 » |
Section 2
The first thing we are going to do is split out the two lines that turn the tone on and off.
We will take them out of loop() and put them into their own procedures.
Start by deleting the lines highlighted in orange on the right. Then copy the ones highlighted in yellow and paste them into your sketch as you see here. Compile your sketch and run it. It should behave exactly as it did before. |
|