Arduino Workshop - Project 04: Push-On, Push-Off - Part 1


Hardware Required:

  • Arduino Uno board
  • LED (any color)
  • 330 ohm, 10 K ohm resistor
  • Pushbutton switch (N.O.)
  • jumper wires


Schematic:



Project Steps:

  1. Insert the LED in the breadboard
  2. Connect a wire between the ground and the short pin of the LED
  3. Connect a 330 ohm resistor between the D13 on the Arduino and the long-leg of the LED
  4. Insert the pushbutton into the breadboard
  5. Connect one pin of the pushbutton to +5V
  6. Connect the second pin of the pushbutton to D7
  7. Connect a 10K ohm resistor to the second pin of the pushbutton
  8. Connect a wire between the open end of the 10K ohm resistor and the ground.
  9. Connect the Arduino unit to your computer with the USB cable
  10. Open the Project4 sketch into the Arduino software and upload it to your module

Troubleshooting:
The LED should be off after the program loads. Push the button, it should turn on the LED. If the LED does not turn on, make sure the short leg of the LED connects to the ground, and the long leg connects to pin D13 (your LED should flash at the same time the one on the Arduino does during the program load.) The on-board LED should turn on and off with the pushbutton. If neither LED turns on and off, verify your button connections. Try rotating the pushbutton 90-degrees. (The legs of the pushbutton come out of the side. Use both connections from either side in your circuit; the pushbutton pins from opposite sides are the same connection always on - and will not act as a switch.)

Technical Support Community

Free technical support is available for your desktops, laptops, printers, software usage and more, via our new community forum, where our tech support staff, or the Micro Center Community will be happy to answer your questions online.

Forums

Ask questions and get answers from our technical support team or our community.
PC Builds
Help in Choosing Parts
Troubleshooting

Knowledge Base

Helpful articles written by Micro Center Experts.
ESET
Windows

Sign in for the best experience

Access helpful features and personalize your experience - Sign in or create an account now

Sign In
Don't have an account? Create Account