Shop OBEX P1 Docs P2 Docs Learn Events
RUN Command for BS2 SX — Parallax Forums

RUN Command for BS2 SX

sam_sam_samsam_sam_sam Posts: 2,286
edited 2009-05-29 19:49 in General Discussion
·I just got a· BS2 SX OEM Kit·· Could some one tell me what you would use the RUN Command for· And how you would use it

Could some one give an example of a routine that would be easier to use the run command


Please use the same routine for both example· a real simple routine


Basic Stamp··


Basic Stamp SX

I want to understand how you would use this command

I ran the example in the Basic Stamp Editor but I do not really understand the example
·I want·an every day use example

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
··Thanks for any·idea.gif·that you may have and all of your time finding them

·
·
·
·
Sam

Post Edited (sam_sam_sam) : 5/29/2009 7:49:49 PM GMT

Comments

  • xanatosxanatos Posts: 1,120
    edited 2009-05-29 00:47
    The Run command allows you to switch which program your BS2sx is running. Unlike the BS2, which has 2k memory, the BS2sx has 8 x 2k memory. But they are kept separate, which means you can't have a single 16k program on the chip. But you CAN have up to 8 separate 2k programs, and they can all communicate from one to the other by writing data to the scratchpad ram, so you may have program 1 (the default program the BS2SX will always start up with) with some setup parameters (maybe initializing something, measuring some levels, etc., then it would write some parameter that program 2 will need in order to operate from what program 1 finds. Then, the last thing program 1 does is to issue the RUN command, telling it to RUN 2 for example. Then program 2 would take over. You could eve have it select which program to run depending on parameters established by program 1 - for example, if it is light, run program 2, but if it is dark, run program 3. Stuff like that.

    A throwbot project would run program 1 to initialize the sensors and servos, then determine if it was right-side-up, upside down, or on its side, then run a different program depending on its orientation in order to right itself before running the program that tells it to begin moving somewhere... I haven't actually looked at the Tickle Me Elmo that rolls around on the floor, but it *may* use something like this with whatever controller it employs to always get itself standing again after rolling on the floor laughing.

    ::remembers that I have to get one of those to tear apart - evil grin -::

    Anyway - that's what the RUN command is for. If you're only used to running BS2 programs, you'll have to do a little reading to get the low-down on using the BS2sx.

    Dave
  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2009-05-29 02:11
    xanatos

    Thank for your example of how you might use the RUN Command




    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ··Thanks for any·idea.gif·that you may have and all of your time finding them

    ·
    ·
    ·
    ·
    Sam
  • PhilldapillPhilldapill Posts: 1,283
    edited 2009-05-29 02:29
    Sam,
    This doesn't pertain to your subject, but just word to the wise. You might need to compress your subject title's down a bit. Typically, when someone is scanning the list of forum subjects, they(I especially) tend to skip over the long, drawn out subjects. For example, if you make your subject "RUN Command for BS2", you might get more responses and help. I just mean this as a tip from my own experience.
  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2009-05-29 19:49
    Philldapill

    Thank for the tip

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ··Thanks for any·idea.gif·that you may have and all of your time finding them

    ·
    ·
    ·
    ·
    Sam
Sign In or Register to comment.