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: mbed
Diff: test.cpp
- Revision:
- 1:f8ed70330216
- Parent:
- 0:25538f02f59a
- Child:
- 2:01ca44dd3908
--- a/test.cpp Tue Dec 04 04:23:40 2018 +0000
+++ b/test.cpp Tue Dec 04 04:38:15 2018 +0000
@@ -7,7 +7,7 @@
void sendSerial(void) {
if(serial.writeable()) {
- serial.printf("%.2f ",123.5);
+ serial.printf("Amigo!_This_is_Sunnylego!%.1f ",123.5);
wait_ms(500); // lag to debounce the button
}
}
@@ -23,12 +23,12 @@
Serial pc(USBTX, USBRX);
Serial serial(PA_9,PA_10);
-char data[10];
+char data[30];
int main() {
while(1) {
if(serial.readable() ) {
- serial.scanf("%9s", data);
+ serial.scanf("%30s", data);
pc.printf("Serial data: %s\r\n", data);
}
}