A short test program for all things m3pi and BtBee.

Dependencies:   btbee m3pi_ng mbed

Fork of m3pi_btTest by Nikolas Goldin

You are viewing an older revision! See the latest version

Homepage

The PC side of the BT connection is a simple python program using the serial.py library. The bluetooth connection has been assigned a COM Port.

bt_serial.py

import serial
portnum = 6                    # this is the number of the com port
cp = serial.Serial(portnum-1)  # minus one as numbering starts at zero
print cp

run = 1

while (run):
    if cp.readable():
        line = cp.readline()
        print line
        if (line == "end\n"):
            run = 0
            print "run zero"

cp.write("THATsALL")
cp.close()

All wikipages