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

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

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

Be the First to Share

    Recommendations

    • Instrument Contest

      Instrument Contest
    • Make it Glow Contest

      Make it Glow Contest
    • STEM Contest

      STEM Contest

    Discussions