MySQL for the Internet of Things

(Steven Felgate) #1
ChApTEr 2 ■ hArdwArE for IoT SoluTIonS

■Tip If you power on your shiny new Arduino, you may see the lEd on the board flash. This is because some


Arduino boards come with the blink sketch preloaded.


You’re almost there. Now wire a jumper from the power rail to one side of the pushbutton, and wire
the other side of the pushbutton to (DIGITAL) pin 2 on the Arduino (located on the side with the USB
connector). Next, wire the LED to ground on the breadboard and a 150 ohm resistor (colors: brown, green,
brown, gold). The other side of the resistor should be wired to pin 13 on the Arduino. You also need a resistor
to pull the button low when the button isn’t pressed. Place a 10K ohm resistor (colors: brown, black, orange,
gold) on the side of the button with the wire to pin 2 and ground.
The longest side of the LED is the positive side. The positive side should be the one connected to the
resistor. It doesn’t matter which direction you connect the resistor; it’s used to limit the current to the LED.
Check the drawing again to ensure that you have a similar setup.


Figure 2-16. Diagram of an LED with a pushbutton

Free download pdf