Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: btbee m3pi_ng mbed
Fork of m3pi_btTest by
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();
