Go Down

Topic: Controlling LED based on the real time... help please (Read 248 times) previous topic - next topic

casampot

Hello ... please help me.. how can i turn ON a LED at 8am and turn OFF at 8:05am ... real time ... is it possible? Please i need your help about the codes.. thanks

marco_c

You will need a real time clock module (like the DS3231 module) and then a library that will allow you to read the time from the clock. When the time reaches your target, you turn the LED on.

What have you done so far?
Arduino Libraries https://github.com/MajicDesigns?tab=Repositories
Parola for Arduino https://github.com/MajicDesigns/Parola
Arduino++ blog https://arduinoplusplus.wordpress.com

INTP


casampot

Oh okay ... can you give me a sample code po turning a LED on at 8am and turn it off at 8:05?

Btw what is the library needed for the rtc module?

INTP

Buy the module. Look for RTC libraries. They will have code.
Get the clock working.
Then it's just as simple as an if condition for time.

Go Up