Shop OBEX P1 Docs P2 Docs Learn Events
BASIC Question — Parallax Forums

BASIC Question

blah23blah23 Posts: 4
edited 2006-03-24 18:13 in Robotics
I was considering writting a program for the basic stamp that would allow a robot to map out a room. It would use a 2-D array to map the room (the size of the room would need to be entered, and it could only be a rectangular room). I was just wondering if BASIC supports arrays, thanks

Comments

  • Bruce BatesBruce Bates Posts: 3,045
    edited 2006-03-24 06:44
    blah23 -

    The PBASIC Stamp has limited support for one dimensional arrays, but the bigger problem is the limited amount of RAM available. Each Stamp only has 26 bytes of RAM available, which is a maximum of 2 x 13 or (roughly) 5 x 5 in terms of mapping. Once that has been "used", it's necessary to dump it to external storage, so that same area can be used again.

    With the average room being 9 x 12 (or larger) I think the impractability exposes itself rather quickly. A mini-computer (80x86, 68xxx, etc) with more user RAM available, would provide a much better platform than a micro-controller, for the purposes of mapping.

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    <!--StartFragment -->
  • JavalinJavalin Posts: 892
    edited 2006-03-24 12:17
    Another suggestion to increase the size of your room size array would be to use an EEPROM. These are cheap and easily accessed via I2C - I think there is a Nuts&Volts article on this.

    http://www.parallax.com/detail.asp?product_id=604-00020

    James
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-03-24 18:13
    Another possibility would be to use a BS2p series which has 126 bytes of ScratchPad RAM which you could use for this data.· The data could then be stored in one of the EEPROM Slots by room, and eventually you would have them all in EEPROM.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
Sign In or Register to comment.