What's a Microcontroller!
Hello: I'm new to this forum, I believe you need a section called Newbie; or maybe stupid. I recently purchased What's a Microcontroller, I started from the beginning, by downloading the latest Stamp editor IDE ver # 2.5, run on Windows Vista. As I progressed through the activities I stumbled on the DO - LOOP command page 49.. I can run this program however it will not loop?
' {$Stamp BS2}
' {$PBASIC 2.5}
DO
HIGH 14
Pause 500
LOW 14
PAUSE 500
LOOP
When this code is run, the led lights for the period set in statement 2 and then off and never turns back on? I tried using another method to loop with goto do, and the exercise works as it is was intended? I've invested 4 hours into this before asking for help! This must be real simple as I'm not new to programming; can someone help with this problem?
Thanks Much
Ken
' {$Stamp BS2}
' {$PBASIC 2.5}
DO
HIGH 14
Pause 500
LOW 14
PAUSE 500
LOOP
When this code is run, the led lights for the period set in statement 2 and then off and never turns back on? I tried using another method to loop with goto do, and the exercise works as it is was intended? I've invested 4 hours into this before asking for help! This must be real simple as I'm not new to programming; can someone help with this problem?
Thanks Much
Ken
Comments
It was a cut and paste! One thing that I do see, is that the DO & LOOP are in black not blue? Using the Stamps in class ver. #1 with the BS2 module, also a integrated BS2 stamps in class board with the same results. Also tried a BS2P Stamp in the Home work board same result after the editor changed the stamp too BS2P.
Thanks Much
Ken
Thanks
Ken
It appears that if your PBASIC reserved words DO & LOOP are black and not blue, the compiler may be reading PBASIC 2.0 and not PBASIC 2.5. To verify that your are using the correct compiler directive, click the gear icon labeled "2.5" in the top toolbar and see if this fixes your problem.
Jessica
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jessica Uelmen
Parallax Education Associate
Yep that is what it was, somehow the editor was in 2.0 not 2.5!! Thanks very much, I knew that it would be something simple and it was. This was an educational moment!
Thank you again Jessica, and many thanks to Mike.
Ken