Store variables in boebot
Hello
I was just wondering if theres any way to store a variable in the boebot. For example; When the boebot moves forward the variable "a" increases by 1 on every pulse. Is there any wat to let the robot drive unconnected to the serial port, then connect it when the drive is complete, and make it debug the value of "a"? Hope you understand what i mean! Thanks in advance.
// Johan
I was just wondering if theres any way to store a variable in the boebot. For example; When the boebot moves forward the variable "a" increases by 1 on every pulse. Is there any wat to let the robot drive unconnected to the serial port, then connect it when the drive is complete, and make it debug the value of "a"? Hope you understand what i mean! Thanks in advance.
// Johan
Comments
1.· Connect the PC and the Stamp via Serial or USB Cable
2.· Download a program to the stamp
3.· Disconnect the cable
4.· Run the program (which will store a value of a variable)
5.· Reconnect the cable
6. Have the program send the value of the variable to the PC via the "debug" command.
I haven't done it, but it would be easy enough to try.··You could use a switch to let the program know when to run the "debug" part of the program.·
Add READ and DEBUG into the program to view the data on your computer later.
Just be careful not to put WRITE in a loop, otherwise you will exceed the amount of write cycles of that data location, for the type of stamp you have. The BS2 will take 10 million, but if you have it writing in a loop, it could be used up quickly. Put it at the end of of your program, after the main operations have been completed.
kelvin