Introduction: 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.


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

Step 1: To Get Started

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!!

Step 2: Code

First Time Author Contest

Participated in the
First Time Author Contest