Plant water picaxe

Status
Not open for further replies.

bowser22

Member
So Ive managed to use a picaxe to flash the headlights on my car and like the platform so much I bought another. Id like to create a picaxe program that allows the picaxe to turn on a relay every 12 hours to water my plants. My problem with doing this is that the picaxe pause command doesnt allow time intervals so large.
 
There could be a couple of solutions.
The easiest being use a while loop that executes this bit of code:
1. Pause for say 1 minute
2. Incrament a counter
3. If the counter reaches 720 minutes (12 hours) you would then start watering and reset the counter back to zero.
4. Goto the start of the loop

Inside of this loop you could also check for when the watering should stop to the nearest minute.

This could also be done with interrupts to make it more efficient/maintainable also.
 
Last edited:
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…