I'm playing Picaxe again, and I'm trying to learn these "basic" rules. I'm working on a code for another little video cam project. I'm using a PIR detector and a little board camera connected to an AV transmitter. When motion is detected, I want the camera and transmitter to come on and start sending me videos of the things that go bump in the night . I have a couple of versions of code that I'm playing with to see what works like I want it to, and what doesn't...and what uses the least power.
My question is:
Why do I not have to put an endif after this if? In fact, if I do put one there, the syntax checker says not to??? Please explain this to me...and please, like you would tell a child, cause I'm still mostly a "basic" illiterate.
standby:
W1 = 0
Do While W1 < 1000 'light checking interval...10,000 is about 50 minutes
Nap 4
W1 = W1 + 1
if pin3 = 1 then video
Loop
goto check_light
My question is:
Why do I not have to put an endif after this if? In fact, if I do put one there, the syntax checker says not to??? Please explain this to me...and please, like you would tell a child, cause I'm still mostly a "basic" illiterate.
standby:
W1 = 0
Do While W1 < 1000 'light checking interval...10,000 is about 50 minutes
Nap 4
W1 = W1 + 1
if pin3 = 1 then video
Loop
goto check_light