A short test program for all things m3pi and BtBee.

Dependencies:   btbee m3pi_ng mbed

Fork of m3pi_btTest by Nikolas Goldin

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-1                       # this is the number of the com port
cp = serial.Serial(portnum)   # minus one as numbering starts at zero
                                             # for GNU/Linux it's e.g. /dev/rfcomm0
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