Inputting Letters via Serial Monitor to BS2 ?
DonNohio
Posts: 24
Is it possible to input letters via Serial Monitor to BS2? I can not find any reference to this in the Help directory or in any of the topics. I have a working code using numbers. But it would be more user friendly if I could use letters.
Comments
Sure, the BS2 can accept letters. There are several ways to do it. Here is an example that responds to individual letters that a user types in at a terminal in response to various options...
I am relatively new to the stamp coding and will need a bit more explanation. I have included a piece of my working code:
I am using a Pololu qik-2s9v1 motor controller. This project is going to add animation to my model RR. The mechanics are already under way.
No worries. If you like, you can always edit your previous post with the code.
Just put [co de] right before your program and [/co de] after, but don't use spaces like I did.
I am getting close to getting my code to work.
Each of the movement routines end with an "END", which puts the Stamp into a low-power shutdown mode.
I would suggest using GOSUB/RETURN for the movement routines (check the Reference manual or Help in the Stamp IDE).
And welcome to the Forum.
DJ
In that scheme, you'll have to come up with single letter alternatives for slow forward and slow backward. Oh, it may not be clear from the Stamp manual, but the instruction
DEBUGIN myNum
receives one byte, an ascii code, from the serial input.
Thanks for all your help! I have dropped the slow speeds for now, may not need them. Here is the code.
How do you put a SOLVED on the thread?
Edit your original post in the "advanced" mode. You'll find a selector box toward the top that will have a "solved" option.