control a led using rtc with arduino
finally found a way to control led
using rtc with arduino!!
This is a example sketch.you can create anything using this
example.
what you need:
1.arduino board
2.rtc (real time clock)
3.led (i am using built in led)
*since i am using this rtc module for my projects i noticed aproblem,i set a specific time to turn off and on the led,using(==)[see arduino reference] condition,but in case of power failure, it fails to turn on/off the led.because the time we set has already passed.in this case i figure a new way.please see the full tutorial.
connections are shown below;
*after you complete the connections, you can
upload the code using
arduino ide.i am using the "LED_BUILTIN"
function. so you can change
the code as you refer.
but you have to install libraries first.
here i include them:
>> DS3231 library:click here
>>to include ds3231 library open arduino ide,
sketch>include library>>>add zip library
and you are done.!!!
after doing all the stuff you can oh! finally upload it to the arduino
>>here is the example sketch
use your own imagination to create things!!
if you satisfied with this please comment >>>
created with blogger
[nh-2020]
😄
it is a very helpful article thanks i finally able to control my lights with this code
ReplyDeleteamazing.thanks it is very helpful.
ReplyDeletethis article is very helpful.i used it to control relays.so i would able to control all the lights in the garden at a specific time.thanks again.
ReplyDelete