![]() ![]() There are many other power-saving options you can try by googling, but this lasts multiple months on batteries and works great for now! Use a soldering iron to heat the sides of the built-in LEDs labeled POW and L, then pull or cut to remove them. For more power-saving and to not have the Power LED displaying at all times, you can get rid of the built-in LED on the Arduino Nano (and since I used pin D13 also decided to get rid of the built-in LED on that pin). The code already includes putting the Arduino in Low-Power sleep for 8 seconds, waking to check the time, then going back to sleep. This next part is optional as you can just stick a cup on top and power with a wall plug or portable USB charger. I wanted to make this more permanent and use batteries to operate. I found the following works well for my 5mm LEDS since Green has the highest forward voltage and is the brightest naturally, then dimmer for the other colors: ![]() NOTE: You will probably have to play around with the resistor values to get the right brightness for your LEDs (and also the power draw you want). In the setLEDs() body of the function set the times you want to display the various colors following the examples. Once you verify everything is working, uncomment the setLEDs() function and comment out the testLEDs() function. Verify cycling through the LEDs works and uncomment the serial.print lines if you need to validate the RTC is still outputting the correct time. In the loop you will see commented out the "setLEDs(tm.Hour, tm.Minute) " function and uncommented just below a "testLEDs() " function that cycles through each LED for 8 seconds. Now, hook up the LEDs and resistors according to the schematic.Äownload the Light_Up_Clock_for_Kids.ino sketch and upload.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |