What is a microcontroller? Page 81
Bibliophile6
Posts: 9
The code for this set up:
near the:·········· IF (IN3 = 1) THEN··················
·· I get an error message when running that says, "Expected a label."
What exactly does it want me to do?
near the:·········· IF (IN3 = 1) THEN··················
·· I get an error message when running that says, "Expected a label."
What exactly does it want me to do?
Comments
' What's a Microcontroller - PushbuttonControlledLed.bs2
' Check pushbutton state 10 times per second and blink LED when pressed.
' {PBASIC 2.5}
DO
· DEBUG HOME
· DEBUG ? IN4
· DEBUG ? IN3
· IF (IN3 = 1) THEN
··· HIGH 14
··· PAUSE 50
· ELSEIF (IN4 =1) THEN
··· HIGH 15
··· PAUSE 50
· ELSE
··· PAUSE 50
· ENDIF
· LOW 14
· LOW 15
· PAUSE 50
LOOP
It is allways the most simple things that can be the problem. Sorry about that.
You can spare yourself the typing (and typos) by inserting those directives with the toolbar buttons, as on page 21.·
-Stephanie Lindsay
Editor, Parallax Inc.