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.
Diff: classes.h
- Revision:
- 26:f891ff6beb33
- Parent:
- 24:92f612ca218b
- Child:
- 27:3bbc354adea6
diff -r 7b3826dddcba -r f891ff6beb33 classes.h
--- a/classes.h Wed May 16 12:19:49 2018 +0000
+++ b/classes.h Thu May 17 23:08:43 2018 +0000
@@ -1,7 +1,7 @@
#define tx PC_10
#define rx PC_11
-#define sendTime 0.1
+#define sendTime 0.5
Serial ihm(tx, rx); //tx e rx (D1 e D0)
@@ -20,15 +20,19 @@
buffer.append("p");
- n = sprintf(buffer_char, "X%.3f", X);
+ n = sprintf(buffer_char, "X%.2f", X);
buffer.append(buffer_char);
- n = sprintf(buffer_char, "Y%.3f", Y);
+ n = sprintf(buffer_char, "Y%.2f", Y);
buffer.append(buffer_char);
- n = sprintf(buffer_char, "Z%.3f", Z);
+ n = sprintf(buffer_char, "Z%.2f", Z);
buffer.append(buffer_char);
send(buffer);
}
+
+ void action_complete(void){
+ send("a");
+ }
private:
@@ -38,7 +42,8 @@
for(int i = 0; i < msg.length(); i++){
ihm.putc(msg[i]);
- wait_us(1);
+ wait_ms(15);
}
+ printf("Sent\n\r");
}
};
\ No newline at end of file