Shop OBEX P1 Docs P2 Docs Learn Events
Storing data in the EPROM of Boe-Bot — Parallax Forums

Storing data in the EPROM of Boe-Bot

heavy-freelancerheavy-freelancer Posts: 23
edited 2011-01-09 11:35 in Robotics
Hey,

I've created a program that makes the Boe-Bot go straight ahead and then return to his initial departure after rotating in DO LOOP instruction to an infinite time.

now I need to store the number of the round-trip in the EPROM, so I can read it after connecting the robot to my computer.

I've tried to store it in a variable but when I connect the robot to the computer the variable equal to 0.

Is there any chance to store this value somewhere in the EPROM and read it when I connect the robot by doing another program that's just reads this value.

Thanks.

Comments

  • Mike GMike G Posts: 2,702
    edited 2011-01-09 11:25
    The READ and WRITE commands read and write to EEPROM. More information can be found in the Basic STAMP Help.
  • heavy-freelancerheavy-freelancer Posts: 23
    edited 2011-01-09 11:29
    For example how can I create a program that write a value into some variables, and another program that reads those variables.

    Thanks.
  • Mike GreenMike Green Posts: 23,101
    edited 2011-01-09 11:35
    Please read the sections of the Stamp Basic Manual or the Editor help files on the READ, WRITE, and DATA statements. There are examples given there. If you have any questions after reading those sections, please ask. The download process to the Stamp's EEPROM does not affect data stored in the EEPROM as long as the new program doesn't extend into the area used for data (see the DATA statement documentation). The program gets loaded from the top end of memory downwards while data is normally stored beginning at the bottom of memory (locations 0 and up).
Sign In or Register to comment.