Shop OBEX P1 Docs P2 Docs Learn Events
Parallax sensors — Parallax Forums

Parallax sensors

AImanAIman Posts: 531
edited 2006-09-28 15:32 in General Discussion
Question:

Will the Parallax sensors work with languages not specific to Parallax products?

For example I am working on a program where many of the things could be done with Parallax sensors and a BS2, however the part of the program requiring Video Camera use is·more code than a BS2 can hold. So that means either I need to find a way for the BS2 to accept and understand commands coming from a different language OR simply skip the BS2 and use the sensors. Can I get around this?
·

Comments

  • Bruce BatesBruce Bates Posts: 3,045
    edited 2006-09-27 11:01
    AIMan -

    There is no requirement that the Parallax sensors be used with any particular language or platform. However, if this were my project, I'd prefer the ease of programming of PBASIC and utilize one of the larger capacity Stamps with banked memory (8 x 2K), like a BS-2SX (or better) rather than wasting my time and energy programming a PC to do it. Kind of overkill in my mind, and the PC program may become outdated (thank you MS!) before you get to the final version smile.gif

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    <!--StartFragment -->
  • Kevin WoodKevin Wood Posts: 1,266
    edited 2006-09-28 01:36
    AIman,

    You can program the BS2 to accept incoming commands by using the SERIN variable.

    Let's say you have three LEDs hooked up to your BS2, where receving a letter 'A' lights up LED1, 'B' LED2, 'C' LED3, and any other input prints an error message. Your SERIN routine would receive the ascii character, then call a subroutine based on the value of the character. After the subroutine finishes, the BS2 goes back to waiting for another command.

    I posted a couple of examples in this thread that you can look at:

    http://forums.parallax.com/showthread.php?p=605784
  • AImanAIman Posts: 531
    edited 2006-09-28 15:32
    Thanks for the tips.
Sign In or Register to comment.