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.
Fork of Cheetah3Passthrough by
Revision 1:542050a917de, committed 2016-12-27
- Comitter:
- pwensing
- Date:
- Tue Dec 27 00:33:53 2016 +0000
- Parent:
- 0:58d3ade33116
- Commit message:
- updated timing;
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Mon Dec 19 19:55:51 2016 +0000
+++ b/main.cpp Tue Dec 27 00:33:53 2016 +0000
@@ -7,6 +7,12 @@
SPISlave spi(PA_7, PA_6, PA_5, PA_4);
+void flush()
+{
+ while(motorDriver.readable()){
+ int byte = motorDriver.getc();
+ }
+}
@@ -123,15 +129,21 @@
spi.reply(0x0);
+
motorDriver.baud(1000000);
motorDriver.attach(&echo);
motorDriver.format(8, Serial::None, 2);
- wait(.1);
+ wait(.4);
+ motorDriver.putc(0x80);
+ wait(.2);
motorDriver.putc(0x80);
- wait(.1);
- motorDriver.putc(0x6d);
-
-
+ wait(.2);
+ motorDriver.putc('p');
+ wait(.2);
+ motorDriver.putc('m');
+ wait(.2);
+ motorDriver.putc(0x40);
+ motorDriver.putc(0x00);
while(1) {
