Parallax sensors
AIman
Posts: 531
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?
·
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
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
Regards,
Bruce Bates
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
<!--StartFragment -->
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