Hardware Reference
In-Depth Information
Here, you are replicating the code for the led connected to pin 13 to the second led1
connected to pin 12 and the third led2 connected to pin 13. You then program them all to
be output pins, and then in the main loop, toggle between high and low. Note that I have
two toggling together (pins 13 and 11) with the other (pin 12) toggling in the exact oppos-
ite sequence. First, the two outer LEDs should light for one second, and then the inner
LED should light.
If one or more of the LEDs don't light, check to make sure that they are pushed firmly
down into the board. You can also change the direction of the LED; perhaps you have the
leads in the wrong direction on the board.
You can do the same thing with the FLORA board, but you'll need to use alligator clips to
connect from FLORA to the breadboard. To do this, build the breadboard as shown earli-
er. Then, connect the first alligator clip to the right side of one of the resistors on the
breadboard. After this, connect it to the GND connector on FLORA. Then, connect the al-
ligator clips to LED 10 and the left side of the top of the breadboard.
Once you have done that, connect the other two LEDs to the LED 12 and LED 9 pins, as
shown in the following image:
Now, bring up the Arduino IDE associated with FLORA. Create the code shown in the
following screenshot, patterned after the code you created in Chapter 1 , Powering on Ar-
duino :
Search WWH ::




Custom Search