I have been having an issue that I have tried many times to solve without success, maybe someone with more experience can assist?
Code:
#picaxe 14M2
symbol LDRpin = C.4 ; LDR pin
symbol PumpPin = B.5 ; NFT Pump pin
symbol DayTime = 100 ; LDR reading for day time
start2:
if readadc(LDRpin) >= DayTime then ; it's day time
high PumpPin ; turn on the pump
pause 1000 ; pause for 1 second
else ; it's night time
low PumpPin ; turn off the pump
for b1 = 1 to 180 do ; repeat 180 times (180 x 10 sec = 30 min)
pause 10000 ; pause for 10 seconds
next b1
high PumpPin ; turn on the pump for 5 minutes
for b2 = 1 to 10
pause 30000 ; pause for 30 seconds
next b2
endif