Hello, I am a newbie with arduino.
Can I put an timer on a GPIO output on a wemos d1?
Let's say output high at 7 am en output low on 11 pm.
I have already an sketch with an ntp clock.
Yes, you can do that.
Best wishes for success with your project!
Ok, but how do i do that?
my project is an wemos d1 with an max7219 8x32 diplay. and i want a gpio-pin on and off in de sketch. so i can use the timer for an arduino nano trough an relais put on and off.
My english is that good but i hope anyone can help with it.
If you already have a sketch with a ntp clock, you already have the current time.
if (currentTime < 7:00 && currenTime > 23:00 ) digitalWrite(pin, LOW)
else digitalWrite(pin, HIGH);
Based on how you receive the time, you will have to convert "7:00" and "23:00" into some sort of numeric value for the comparison. The easiest would be just seconds since midnight.
Without posting your code, only you know for sure...
Thanks, I am at work right now. I will post my code later.
I can't post my code because I'm new at the forum
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.