How can I tell my program that it must execute the sequence1 forever while going on with the rest of the script?
I know that “goto” is wrong, it’s just to make you understand my problem…
Any good link to suggest me? I’m on “What’s a microcontroller” by Parallax.
I am by no stretch of the imagination a programming guru. Anyone who knows this better than I do, please chime in.
Basic Stamps and Atoms run basic code in a straight line fashion. There are some tricks to get what appears to be more than one thing going at a time, but there are limits to what can be done.
The Basic Stamp is strictly interpreted. It reads a line from the program and executes it. then grabs a new instruction, etc. The Basic Atom is a hybrid of sorts as it compiles parts of the code for faster execution. The Basic Atom also has the ability to use interrupts to truly control things “in the background.” Unfortunately I’m not able to provide a detailed description of how to incorporate interrupts in your sensor code. Clear as mud eh?