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 m3pi_HelloWorld by
Diff: main_copy.cpp
- Revision:
- 8:d7fcb4946b5f
diff -r d0689e8f23bf -r d7fcb4946b5f main_copy.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main_copy.cpp Thu Feb 26 20:44:11 2015 +0000
@@ -0,0 +1,23 @@
+#include "mbed.h"
+#include "m3pi.h"
+
+m3pi m3pi;
+
+int main() {
+
+ m3pi.locate(0,1);
+ m3pi.printf("LO World");
+
+ wait (2.0);
+
+ m3pi.forward(0.5); // Forward half speed
+ wait (0.5); // wait half a second
+ m3pi.left(0.5); // Turn left at half speed
+ wait (0.5); // wait half a second
+ m3pi.backward(0.5);// Backward at half speed
+ wait (0.5); // wait half a second
+ m3pi.right(0.5); // Turn right at half speed
+ wait (0.5); // wait half a second
+
+ m3pi.stop();
+}
\ No newline at end of file
