Arduino Forum
>
Using Arduino
>
LEDs and Multiplexing
>
Controlling LED based on the real time... help please
Print
Go Down
Pages:
[1]
Topic: Controlling LED based on the real time... help please
(Read 498 times)
previous topic
-
next topic
casampot
Newbie
Posts: 10
Karma: 0
[add]
Controlling LED based on the real time... help please
Mar 12, 2018, 03:17 am
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
Karma points always welcome.
Faraday Member
Posts: 3,463
Karma: 624
[add]
Big things come in large packages
https://arduinoplusplus.wordpress.com/
Re: Controlling LED based on the real time... help please
#1
Mar 12, 2018, 06:13 am
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
Faraday Member
Posts: 3,278
Karma: 452
[add]
Re: Controlling LED based on the real time... help please
#2
Mar 12, 2018, 06:17 am
Use an RTC Module.
casampot
Newbie
Posts: 10
Karma: 0
[add]
Re: Controlling LED based on the real time... help please
#3
Mar 13, 2018, 03:18 am
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
Faraday Member
Posts: 3,278
Karma: 452
[add]
Re: Controlling LED based on the real time... help please
#4
Mar 13, 2018, 06:38 am
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.
Print
Go Up
Pages:
[1]
Loading...