Arduino Night Light

by meganlin23 in Circuits > LEDs

225 Views, 0 Favorites, 0 Comments

Arduino Night Light

A972DF92-13B8-4C1E-BDCA-9A456CE8BDB1.jpeg
Arduino Night Light

I edited from Arduino Turn on Led Using Button by mehmetsukru

Originally, you hold the button (there's only one) the light will be on, and it will not light when released. I change to two buttons. One is for turning on the light, and another is for turning off, like a night light.

List:

  • Light bulb x1
  • Male to male breadboard jumper wires
  • Resistors x1
  • Arduino Leonardo
  • Breadboard
  • Buttons x2
  • A bag

To Get Started

F9B023FC-7962-4DFE-88BA-B36823A99D83.jpeg

This is very simple!

  1. Connect one button to pin 2 and positive electrode (+)
  2. Connect another button to pin 3 and +
  3. Connect 5v to the +
  4. Connect GND to the negative electrode (-)
  5. Connect one foot of the light to the negative electrode (-) , insert resistor's one foot on the same row (straight row).
  6. Connect to pin 9 with the other foot of the resistor (straight row)
  7. Use a bag to cover the wires

Assembly Completed!!

Code

Downloads