Communicate between HC05 Bluetooth and PC
Dependencies: mbed
main.cpp
- Committer:
- mrbhatter
- Date:
- 2018-07-01
- Revision:
- 0:d064762c393c
File content as of revision 0:d064762c393c:
#include "mbed.h" Serial pc(USBTX, USBRX); Serial uart(PTE0, PTE1); DigitalOut pc_activity(LED1); DigitalOut uart_activity(LED2); int main() { uart.baud(9600); while(1) { if(pc.readable()) { uart.putc(pc.getc()); pc_activity = !pc_activity; } if(uart.readable()) { pc.putc(uart.getc()); uart_activity = !uart_activity; } } }