I need help for timer

I want to go on vacation for a long time, and wanna make the automatic feeder for my pets and i dont know how i can do this.
I encountered a timer problem, i actually got no ideas for how do this i try do this with a clock node, but i need the servo triggers after a certain time, but works with the same period as the time after which the clock node triggers. if somebody know how to do the timer, please attach a screenshot under this post.
Thanks in advance :pray:

If you really want feeding to happen at the same time, you will need a RTC (Real Time Clock) module. There are other threads on this forum discussing that.

You can use β€˜delay’ node to have the dispenser fire after X seconds, and repeat, but Arduino clock loops around every few days, and even without that, repeating every X seconds is likely to drift over time. The traffic light example New guide article: Simple Traffic Light Example will show you how to use delay and loops.

You will only need 2 of the 3 delay nodes from the traffic light example. The first is your delay between feedings, the second is to give the servo time to open, then restart loop. delay-ACT of 2nd delay node should feed an if-else-COND. if-else-T will be position of servo to dispense food. if-else-F will be position of servo between feedings. Output of if-else feeds to servo position pin.

1 Like

Thank you very much, you helped a lot!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.