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: MODSERIAL mbed-rtos mbed
Fork of Master by
bluetooth.cpp
- Committer:
- 9uS7
- Date:
- 2014-09-11
- Revision:
- 2:c610e1a7fbcd
- Parent:
- 1:e1cfb5850088
- Child:
- 3:12e1f116ea42
File content as of revision 2:c610e1a7fbcd:
#include "mbed.h"
#include "bluetooth.h"
#include "control.h"
Serial bt(p13, p14); // tx, rx
void btSetup(int role)
{
if( role==BT_MASTER ){
//if this device is the master
bt.baud(9600);
bt.printf("$$$");
wait(0.5);
bt.printf("C\r");
wait(0.5);
}
else{
//if this device is the slave
; //nothing to do
}
/*
void btLoop(int role)
{
if( role==BT_MASATER ){
//if this device is the master
}
else{
//if this device is the slave
}
}
*/
