Ohnishi_Gundan / Mbed 2 deprecated Master-FM

Dependencies:   MODSERIAL mbed-rtos mbed

Fork of Master by Ohnishi_Gundan

bluetooth.cpp

Committer:
9uS7
Date:
2014-09-11
Revision:
1:e1cfb5850088
Parent:
0:4f07ba929908
Child:
2:c610e1a7fbcd

File content as of revision 1:e1cfb5850088:

#include "mbed.h"
#include "bluetooth.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
    }
}