Shop OBEX P1 Docs P2 Docs Learn Events
Bluetooth Communication — Parallax Forums

Bluetooth Communication

Joch119Joch119 Posts: 7
edited 2008-07-19 13:45 in BASIC Stamp
I am trying to communicate via bluetooth with the eb500 and the board of education. I know some PBASIC programming from reading the different manuals on the parallax website, but not enough. I have established bluetooth connectivity and was wondering how to send a command through bluetooth to say make an LED light up. Say through one of the I/O pins on the board.

Can anyone please help me with say a simple program to make one of the pins HIGH.

Comments

  • JonathanJonathan Posts: 1,023
    edited 2008-07-19 13:45
    It's all done with SEROUT/SERIN commands. Take a look in the EB500 docs for the example of using hyperterminal. Essentially, make a loop on the Stamp that waits for a certain character. Using hyperterminal or similar, send the correct command.

    command var byte

    main:
    serin pin,baud[noparse][[/noparse]command]
    if command = the right command
    light LED
    endif
    goto main

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.madlabs.info - Home of the Hydrogen Fuel Cell Robot
Sign In or Register to comment.