Timer
walt9285
Posts: 1
Hi everyone,
I am doing a project for school and I have to build a titration system, I am using a Stamp program to turn pumps on and off by using LEDs and Photo-diodes. I was wondering if there was a way to count the seconds one of the pumps is on and then save it to a file?
Thanks for the help,
Travis
I am doing a project for school and I have to build a titration system, I am using a Stamp program to turn pumps on and off by using LEDs and Photo-diodes. I was wondering if there was a way to count the seconds one of the pumps is on and then save it to a file?
Thanks for the help,
Travis
Comments
Set time count to zero
Turn on pump
OnLoop:
PAUSE 10 (to give you a 10ms time "tick"
Increment count
See if you want to turn pump off, GOTO OnLoop if not
Count now gives on time in units of 10ms
Turn off pump
Another alternative is to used some kind of external timer like a DS1302 Real Time Clock