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
main.cpp
- Committer:
- 9uS7
- Date:
- 2014-09-11
- Revision:
- 1:e1cfb5850088
- Parent:
- 0:4f07ba929908
- Child:
- 2:c610e1a7fbcd
File content as of revision 1:e1cfb5850088:
//Master mbed Program #include "mbed.h" #include "fm.h" #include "bluetooth.h" #include "control.h" //BT_MASTER or BT_SLAVE #define DEVICE_ROLE BT_MASTER Serial pc(USBTX, USBRX); // tx, rx //debug DigitalOut led1(LED1); DigitalOut led2(LED2); DigitalOut led4(LED4); DigitalOut myled1(LED1); DigitalOut myled2(LED2); //byte converter Cvt cvt; void btRead(void); int main() { //FM_FREQUENCY is defined in fm.h unsigned int fm_frequency = DEVICE_ROLE==BT_MASTER ? FM_FREQUENCY1 : FM_FREQUENCY2; i2cSetup( fm_frequency ); btSetup(DEVICE_ROLE); while(1){ /*i2c.start(); i2c.write(0x11); i2c.write(0x42); i2c.write(0x07); i2c.write(0x0F); i2c.stop(); wait(0.05);*/ } }