Code:
'REUK.co.uk - The Renewable Energy Website.
'Picaxe Basic code for a repeating ON/OFF timer
'with the following ON and OFF timings:
'ON for 0 hours, 20 minutes, and 0 seconds.
'OFF for 4 hours, 0 minutes, and 0 seconds.
symbol relay = C.1
main:
for b2 = 1 to 20
gosub pauseONEminute
next b2
low relay
for b2 = 1 to 4
gosub pauseONEhour
next b2
goto main
pauseONEhour:
'Pause for one hour.
for b0 = 1 to 60 'minutes
gosub pauseONEminute
next b0
return
pauseONEminute:
'Pause for one minute.
for b1 = 1 to 60 'seconds
gosub pauseONEsecond
next b1
return
pauseONEsecond:
'Pause for one second.
'1000ms (milliseconds) is one second.
pause 1000
return
I want to use this code ( from UK Picaxe) for driver relay ON 20 min every 4 hours But this program run 24/24, Now I want modifier the code for running 12/24 it mean:
0 to 12 o'clock program ON and 12 to 24 o'clock program pause (OFF) and repeat. So please help me to have a new code
Many thank you
Best regards
l;am
Mod Edit :added code tags
Last edited by a moderator: