Example program for the Seeed Studio Shield Bot

Dependencies:   SeeedStudioShieldBot mbed

Files at this revision

API Documentation at this revision

Comitter:
melse
Date:
Mon Jul 15 14:09:05 2013 +0000
Commit message:
Initial Commit

Changed in this revision

SeeedStudioShieldBot.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r 96c652480857 SeeedStudioShieldBot.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SeeedStudioShieldBot.lib	Mon Jul 15 14:09:05 2013 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/melse/code/SeeedStudioShieldBot/#9479362be27f
diff -r 000000000000 -r 96c652480857 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Mon Jul 15 14:09:05 2013 +0000
@@ -0,0 +1,19 @@
+#include "mbed.h"
+#include "SeeedStudioShieldBot.h"
+
+SeeedStudioShieldBot bot;
+float speed = 0;
+
+int main() {
+    bot.enable_right_motor();
+    bot.enable_left_motor();
+    
+    while(1) {
+        speed += 0.1;
+        bot.forward(speed);
+        wait_ms(1000);
+        if (speed == 1) {
+            speed = 0;
+        }
+    }
+}
diff -r 000000000000 -r 96c652480857 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Mon Jul 15 14:09:05 2013 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/b3110cd2dd17
\ No newline at end of file