Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

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.

Latest threads

New Articles From Microcontroller Tips

Back
Top