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:
- 2:c610e1a7fbcd
- Parent:
- 1:e1cfb5850088
- Child:
- 3:12e1f116ea42
File content as of revision 2:c610e1a7fbcd:
//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); //buf:for bluetooth Cvt buf; void btRead(void); int main() { //FM_FREQUENCY is defined in fm.h unsigned int fm_frequency = DEVICE_ROLE==BT_MASTER ? FM_FREQUENCY1 : FM_FREQUENCY2; fmSetup( fm_frequency ); btSetup(DEVICE_ROLE); motorSetup(); while(1){ /*i2c.start(); i2c.write(0x11); i2c.write(0x42); i2c.write(0x07); i2c.write(0x0F); i2c.stop(); wait(0.05);*/ } }