I’m looking for some tips on programming basic stamp. My project is similar to a Simon game so I programmed a pattern (didn't use random as it's way over my head) & need to write the programming for recognizing if the player performed the pattern back correctly. I thought I had it with IF THEN ENDIF statements, but it’s not working the way I hope. Any advice?
You can use the "Case" directive. It goes like this.
Evaluate Expression and then conditionally execute a block of code based on comparison to Condition(s). After executing a block of code the program continues at the line that follows ENDSELECT. If no conditions are found True and a CASE ELSE block is included, the CASE ELSE code statements will execute.
Thanks for your help! My project is now functioning properly - what a relief. I wasn't exactly sure what I needed to include w/Select & Code, but after going through it I got a much clearer understanding of what I needed & was able to use IF THEN ENDIF statements to make it work. I think I just need a little more time to fully understand the case directive. I am just a beginner so it's all pretty new to me. I'll probably keep messing w/it to see if I can get the case directive figured out for future use. Thanks again!
Parralax also has a lot of helpful reference documents for the Basic Stamp and for their Sumo Bot robots that use the those processors. The Sumo Bot documents have a lot of good example code for the Stamp.
Here are a few, hope they help!
And another I have on my Dropbox that I couldn't find quickly online: