Wiring up the buttons

Now that we've sorted out our power and ground rails, let's place buttons. For both of the two buttons:

  1. Place the button on the breadboard as outlined in the last section, bridging the gap in the center of the breadboard. 
  2. Wire one side of the button to the side rail connected to the 5V pin on the cobbler.
  3. Place a 10K ohm resistor on the other side, bridging to an empty rail.
  4. Wire the side of the button with the resistor to the side rail linked to GND on the cobbler. Make sure the resistor is in between the button and the link to ground!
  5. Wire the other end of the resistors to a pin on the cobbler; use #5 for button 1 and #6 for button 2, as shown in the next diagram:

And now you're ready to write some code!

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.119.19.174