Charging Reminder

Introduction: Charging Reminder

It is for reminding you to charge your computer or your phone, so when you put your phone on the reminder, and the LED will turn off, and if you forget to put your phone on it, the light will stays on.

(when I charge my phone, I will put it in the same place, so I can remember to charge my phone)

Step 1: Prepare Your Material

Arduino Leonardo *1

Breadboard *1

Wire *7

Long Wire (one side) *4

Photoresistance *1

Resistance *2 (1 Blue and 1 Yellow)

LED *1 (any color)

USB line *1

Step 2: Circuit Diagram

Step 3: Code

https://create.arduino.cc/editor/arielhuang1206/e9...

void setup(){ // put your setup code here, to run once:
pinMode( 10 , OUTPUT); // sets the digital pin as output }

void loop(){ // put your main code here, to run repeatedly:

if ( analogRead( A0 ) < 550 ) { digitalWrite( 10 , LOW ); // sets the digital pin on/off }

if ( analogRead( A0 ) > 650 ) { digitalWrite( 10 , HIGH ); // sets the digital pin on/off }

}

Step 4: Outlook

Use a box to put your Arduino inside, and let the Photoresistance and the LED light stays on the outside of the box.

Step 5: Try It

Be the First to Share

    Recommendations

    • Lamps and Lighting Contest

      Lamps and Lighting Contest
    • Soup & Stew Speed Challenge

      Soup & Stew Speed Challenge
    • Metal Contest

      Metal Contest

    Comments