A short test program for all things m3pi and BtBee.
Dependencies: btbee m3pi_ng mbed
Fork of m3pi_btTest by
Diff: main.cpp
- Revision:
- 5:2e5fd80518c5
- Parent:
- 4:31939848b5ba
- Child:
- 6:19373be8bfe9
diff -r 31939848b5ba -r 2e5fd80518c5 main.cpp --- a/main.cpp Thu May 16 13:36:46 2013 +0000 +++ b/main.cpp Wed May 22 11:42:09 2013 +0000 @@ -11,7 +11,6 @@ Timer t1; - int main() { // initialization stuff //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -24,12 +23,13 @@ m3pi_led[i]=0; } m3pi_pb.mode(PullUp); // expected would be 1 when pb is pressed, 0 when not, opposite is the case + // NOTE on baud rate: the baud rate to be used has to be set on the btBee beforehand. this uses the at mode which is activated by hardware switch. // only use the hw switch while powered off. use the configure_btbee program to write to it. + //btbee.baud(9600); // this is BtBee default for regular commands + //btbee.baud(115200); // this is BtBee regular command set baud rate + //btbee.format(); // the default should be fine - //btbee.baud(9600); // this is BtBee default for regular commands - btbee.baud(115200); // this is BtBee regular command set baud rate - //btbee.format(); // the default should be fine // end initialization stuff //////////////////////////////////////////////////////////////////////////////////////////////// // let me play you the song of my people... @@ -38,7 +38,8 @@ //the number of characters in the array //int len=49; //m3pi.playtune(dixie,len); - + m3pi.locate(0,0); + m3pi.printf("B:%0.3f%V",m3pi.battery()); // wait for the user to push P21, should be pressed when the bt link is established (green led "link") while(m3pi_pb) {