imu for l432kc
Embed:
(wiki syntax)
Show/hide line numbers
test.cpp
00001 00002 /* 00003 #include "mbed.h" 00004 00005 Serial serial(D8, D2); 00006 InterruptIn userButton(USER_BUTTON); 00007 00008 void sendSerial(void) { 00009 if(serial.writeable()) { 00010 serial.printf("Amigo!_This_is_Sunnylego!%.1f ",123.5); 00011 wait_ms(500); // lag to debounce the button 00012 } 00013 } 00014 00015 int main(void) { 00016 userButton.fall(callback(sendSerial)); 00017 00018 while(1) {} 00019 } 00020 */ 00021 /* 00022 #include "mbed.h" 00023 00024 Serial pc(USBTX, USBRX); 00025 Serial serial(PA_9,PA_10); 00026 char data[30]; 00027 00028 int main() { 00029 while(1) { 00030 if(serial.readable() ) { 00031 serial.scanf("%30s", data); 00032 pc.printf("Serial data: %s\r\n", data); 00033 } 00034 } 00035 }*/
Generated on Tue Jul 12 2022 18:54:00 by
1.7.2