byeongjin kim
/
joystick_bluetooth
joystick
main.cpp
- Committer:
- byeongjinkim
- Date:
- 2019-09-20
- Revision:
- 0:f998f1345a11
File content as of revision 0:f998f1345a11:
#include "mbed.h" Serial bt1(PA_0, PD_0); Serial bt2(PC_12, PD_2); void rxData(){ char temp = bt2.getc(); bt1.putc(temp); //convention } int main(){ bt2.baud(115200); bt1.baud(115200); bt2.attach(&rxData, Serial::RxIrq); while(1) { // long int c = 0xFF; } // int output1 = (int)pc.putc(buffer[1006]); // int output2 = (int)pc.putc(buffer[1007]); // printf("%d %d\r\n", output1, output2); // wait(1); }