LED Reminder Light

by TheNewYoriker in Circuits > Arduino

174 Views, 0 Favorites, 0 Comments

LED Reminder Light

IMG-0577.jpg
IMG-0576.jpg
IMG-0572.jpg
EAB2BD9A-7FE1-4049-9958-3AAD7BE3D7EB.jpeg

Do you, like me, suffer from chronic problems like forgetting to, say, bring your swimming bag to school? Do you, like me, feel like everything is hazy and blurry when you wake up? Are you, like me, attracted to bright, glowing things? Boy have I got the thing for you then.

The LED Reminder Light helps you remember to bring things by lighting them up with a big red beacon. The device attaches to a bag strap or the like, and lights up with a red light at a set time every day. When you awake, the light will be there, reminding you to grab your bag. Once you’ve done that, you can just pull the device off , and it’ll turn itself off in a couple minutes.

The red coloring of the LED is on purpose: the light is the least harmful to the human eye, making it a good choice for when you’ve just woken up and need a reminder, as blue light would be eye-piercing and harmful.

Supplies

See above pictures.

  • Arduino Uno x1
  • Red LED x1
  • 9V Battery x1
  • 9V Battery connection x1
  • Wires

Building the Circuits

Screenshot 2021-05-11 001851.png
IMG-2191.jpg

This is really simple. Just wire an LED to the Arduino through the default pins (d13 and ground) and connect the 9V battery to the Arduino through the VIN and GND pins.

  • Connect the anode of the LED to pin 13 on the Arduino using the wire.
  • Connect the cathode of the LED to GND on the Arduino.
  • Connect the positive wire of the battery holder to VIN on the Arduino.
  • Connect the negative wire of the battery holder to GND on the Arduino.
  • Connect the battery to the battery holder
  • Done!

Writing the Code

Screen Shot 2021-05-11 at 12.47.39 PM.png
Screen Shot 2021-05-11 at 12.47.55 PM.png
Screen Shot 2021-05-11 at 12.53.34 PM.png


The code is comprised of two parts: the timer code and the light code.

The timer works by keeping track of the current time in real life. It’s basically just a program that manually counts the time from when you set it. You calibrate it to real time by entering the current time, and give it values for when you need the light to turn on and off.

The light code is just the standard code for LEDs.


For example, the Arduino is currently set to turn on the light every 6:45 am, and to keep it on until 7:05 am.

NOTE: You have to re-enter the current time every time you disconnect the Arduino from its power source or you upload new code to it.

The code is partially referenced from this project: https://create.arduino.cc/projecthub/iceneoon/cloc...

Credit for the clock method goes to him.


Code Link: https://create.arduino.cc/editor/thenewyoriker/4a...

Setting Variables/

Screen Shot 2021-05-11 at 12.54.23 PM.png

Ignore int x and int y; those are debug variables.

int s is seconds,

int m is minutes,

int h is hours.

NOTE: This is where you set the time when calibrating the reminder light.

Clock Code

Screen Shot 2021-05-11 at 12.57.14 PM.png
Screen Shot 2021-05-11 at 1.27.45 PM.png

Create a function, and write out the clock function in it.

Within the loop, check to see if the seconds have exceeded 60; if so, sec = 0 and min +=1. Repeat for minutes and hours(with 24 instead of 60).

LED Light

Screen Shot 2021-05-11 at 2.43.59 PM.png

Add an if loop into void czas to check if the set time has been reached or elapsed.

If the time equals the time you set as the start time (i.e. h = seth and m = setm), bool lighten equals true.

If the time equals the time you set as the end time (i.e. h = endh and m = endm), bool lighten equals false.

Bool lighten controls whether the light is on or not. If it's TRUE, the light turns on, and if it's FALSE, the light turns off.

Making the Outer Shell

19DC9C6D-7F5D-46D5-9EB4-A779DC0F5E90.jpeg

Cut cardboard to size, and form a box. This step is highly customizable; you can turn your reminder light into whatever form you want. The important thing here is the strap/cuff the light will attach to the bag with. Here, I made a simple loop with a piece of double-sided tape, but you could also try Velcro straps, buckles, etc.

Finished Product

A2128394-A7B8-4D68-ABAE-3BC3FF0F73DC.jpeg
138CF837-4CA0-4E76-8BA0-7CC9469B0A1C.jpeg
6A0C34D7-3CA4-4B86-98B6-BAC3A986F766.jpeg
1FE706CB-6150-4A02-89AF-7B1673EBE0A3.jpeg
16C81A67-B12F-4533-9870-EFBA5E75A842.jpeg

Now you’re done! You can now just loop this on any bag and let it remind you that you have a bag you need to bring. Remember to change out the battery once in a while!


Again, remember that you have to reset the time in code every time you power the Arduino off.