Shop OBEX P1 Docs P2 Docs Learn Events
what good is the multiple slots in basic stamp pe? — Parallax Forums

what good is the multiple slots in basic stamp pe?

ObnepecObnepec Posts: 20
edited 2011-02-02 07:03 in BASIC Stamp
All,

Ok, if you have to declare the same variables in the same way in all of the slots is there any gain by using multiple slots except gaining more space for program memory?

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2011-02-02 06:34
    1) Think of the multiple slots as overlays. They might hold separate pieces of a large program with relatively high costs for going from one "overlay" to another. They may be inconvenient to use, but much much better than not having them when you need them.

    2) Alternatively, slots can store large, mostly read-only tables or data. This is true particularly in the BS2pe where there are some "slots" set aside for data only. These can be used for datalogging.
  • ObnepecObnepec Posts: 20
    edited 2011-02-02 06:48
    Mike,

    Datalogging is something I would like to do. I am using a BS2PE. Could you give me a short example of how you would do datalogging?
  • Mike GreenMike Green Posts: 23,101
    edited 2011-02-02 07:03
    Datalogging is just a matter of recording some kind of data periodically, often with a timestamp. The timestamp would have to be provided externally with some kind of read-time clock like a DS1307. There are plenty of examples of that available ... look in the Nuts and Volts Columns.

    Read the sections of the Stamp Manual on the READ / WRITE / DATA / STORE statements for examples of how to use the "slots" for storing data.
Sign In or Register to comment.