Panusorn Chinsakuljaroen
/
BTL432kc
imu for l432kc
test.cpp
- Committer:
- sunninety1
- Date:
- 2018-12-04
- Revision:
- 1:f8ed70330216
- Parent:
- 0:25538f02f59a
- Child:
- 2:01ca44dd3908
File content as of revision 1:f8ed70330216:
#include "mbed.h" Serial serial(D8, D2); InterruptIn userButton(USER_BUTTON); void sendSerial(void) { if(serial.writeable()) { serial.printf("Amigo!_This_is_Sunnylego!%.1f ",123.5); wait_ms(500); // lag to debounce the button } } int main(void) { userButton.fall(callback(sendSerial)); while(1) {} } /* #include "mbed.h" Serial pc(USBTX, USBRX); Serial serial(PA_9,PA_10); char data[30]; int main() { while(1) { if(serial.readable() ) { serial.scanf("%30s", data); pc.printf("Serial data: %s\r\n", data); } } }*/