Shop OBEX P1 Docs P2 Docs Learn Events
Receiving code from Flash drive through Datalogger — Parallax Forums

Receiving code from Flash drive through Datalogger

CourtneyNCourtneyN Posts: 2
edited 2012-04-30 09:58 in BASIC Stamp
Hi all!

We are working on a school project with the Basic Stamp Homework Board 2.

Our code is large so we are wondering if anyone knows how to store the code on the flash drive. We then want to use this code with our parallax board through a datalogger. So hopefully, our datalogger will be able to send code to the board from the flashdrive as well as send data from our sensor to the flashdrive. We understand that this may call for multiple files to be made on our flashdrive.

Please help us out if you know whether this is doable or not!

Thanks!

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2012-04-30 09:47
    It's not really doable on the Homework Board. Although the Stamp can read and write to the EEPROM used to store the program, it can't write into the area used by the program that's actually reading and writing to the EEPROM, so you can't really load a new program into the Stamp from anywhere other than the Stamp Editor running on a PC. With the other Stamp models (BS2sx, BS2p, BS2pe, BS2px), you have more program storage that's organized into 2K "slots" each of which can hold a separate program. You could copy a program from a flash drive file to one of these "slots" and then run it, but you can't do that with a BS2 which is what is on the Homework Board.

    Large programs can often be made much smaller by:

    1) Removing debugging code (You can keep it as comments for documentation purposes)

    2) Shortening string constants used to label display output

    3) Finding commonly used code sequences, maybe with slight differences between them, and making them into subroutines called with a GOSUB, maybe with one or two variables used as parameters / return values.
  • CourtneyNCourtneyN Posts: 2
    edited 2012-04-30 09:58
    Ok. Thank you for the timely response!
Sign In or Register to comment.