Simple moving LED lights using button

 


In this project I used two buttons to move the lit LED. The lit LED will move based on the direction of button pressed

How I made it:
  • 3 LEDS
  • 3 330ohm resistors
  • Arduino
  • Breadboard
  • jumper wires
  • 2 buttons
Pin connections:
  • Arduino pin 2 > 330ohm resistor > LED 1+
  • Arduino pin 3 > 330ohm resistor > LED 2+
  • Arduino pin 3 > 330ohm resistor > LED 3+
    • also connect all LED- pins to negative rail
  • Arduino pin 5 > button 1+ | Negative rail > button 1-
  • Arduino pin 6 > button 2+ | Negative rail > button 2-
  • Arduino GND > Negative rail
The code is posted here

Comments