Shop OBEX P1 Docs P2 Docs Learn Events
communication question — Parallax Forums

communication question

ThirteenevenThirteeneven Posts: 11
edited 2009-02-13 19:03 in BASIC Stamp
hi there
I need to communicate between two boards one is the boe with a bs2 and the other is a phidgetts board with analog inputs. Going from the boe to the phidgetts board what would be the best way to go about this. Also I need it to be in the sense of got data from a sensor on the boe and then send straight to the phidgetts board for interpreting the data and sending commands to a robot that runs on C++ programming

Please help thanks
Josh

Comments

  • dandreaedandreae Posts: 1,375
    edited 2009-02-13 16:42
    You can use the SERIN/SEROUT commands for the BASIC Stamp side of the communication.· You'll need to use the serial communication command for the Phidgett's board, which probably a UARTcommand.



    Dave

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Dave Andreae

    Parallax Tech Support·
  • ThirteenevenThirteeneven Posts: 11
    edited 2009-02-13 16:49
    how would I write the code for SERIN/SEROUT

    Thanks
    josh
  • Mike GreenMike Green Posts: 23,101
    edited 2009-02-13 16:56
    Read the Stamp Manual chapters on the SERIN and SEROUT statements. It's full of explainations and examples.

    What you send from the Stamp to the Phidgett board depends on the details of what you want to do. You can send your sensor data as numbers. You can send some kind of character (like a single letter as a code) that tells your PC program what's happening with the Stamp program. SEROUT just sends what characters and numbers you tell it to.
  • dandreaedandreae Posts: 1,375
    edited 2009-02-13 19:03
    As Mike mentioned, there are examples in the BASIC Syntax and Reference manual for the SERIN/SEROUT.· You'll need to set up the baud rate accordingly with regards to the Phidgett's protocol.·· Here is a link for the download of the manual:

    http://www.parallax.com/Store/Books/BASICStamp/tabid/168/CategoryID/42/List/0/Level/a/ProductID/143/Default.aspx?SortField=ProductName%2cProductName

    Dave

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Dave Andreae

    Parallax Tech Support·
Sign In or Register to comment.