Program won’t loop
navyguy0521
Posts: 7
Hi,
Just signed up for this forum.
Getting back into my parallax basic stamp and my simple program won’t loop.
I’m simply energizing and de energizing a few
5 vdc relays.
Program Just goes through once. I know this is really simple to fix. I’m simply not doing it right.
I can’t post my program from my phone but hoping someone can just help me with an example for looping it.
Thanks so much!
Comments
Welcome to the forums!
People in these forums might not know what a Sketch is. We call them Programs. Would suggest changing the title and post your code when you get a chance,
The Arduino made the term "sketch" popular, because the Arduino IDE was derived from the Processing IDE that was created for artists. The creators of Processing wanted artists to be able to sketch in code the way the can with pencils or paint, hence they refer to Processing programs as sketches.
@navyguy0521 Make sure you have some kind of looping mechanism built into your code. The Arduino hides a lot of details, hence this code:
...actually gets converted to something like this behind the scenes:
There are two BASIC Stamp families, but GOTO will work in both. You might bundle your code in something like this:
Thank you so much for the great explanation!
I’ve used arduino but I like parallax more.
Just seems easier for me.
@JonnyMac said:
Hi. Thanks. Will do.
Trying to keep all the lingo straight between the two.
I got sternly corrected when I called the arduino sketch a program. Lol
Sorry but your example doesn’t work.
When I hit “run” it says “expected label”
Unfortunately, I’m still so green at this that I’ll type in word for word what I’m given.
I don't think you did. I think you left of the color at the end of Main: -- this is how PBASIC defines a label.
BS1:
BS2:
I've attached BS1 and BS2 templates for you to start with.