Junichi Katsu / Mbed 2 deprecated wallbot_test

Dependencies:   mbed wallbot

Files at this revision

API Documentation at this revision

Comitter:
jksoft
Date:
Sun Jul 28 08:21:57 2013 +0000
Commit message:
First

Changed in this revision

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
wallbot.lib Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sun Jul 28 08:21:57 2013 +0000
@@ -0,0 +1,33 @@
+#include "mbed.h"
+#include "wallbot.h"
+
+wallbot wb;
+
+BusOut leds(LED1,LED2,LED3,LED4);
+
+int main() {
+
+    wait(0.5);
+    
+    // Motor test.
+    wb.forward(0.5);
+    wait (2.0);
+    wb.left(0.5);
+    wait (2.0);
+    wb.backward(0.5);
+    wait (2.0);
+    wb.right(0.5);
+    wait (2.0);
+    
+    wb.stop();
+
+    // Sensor & Switch test.
+    while(1)
+    {
+        int bit;
+        wb.GetLinePosition(&bit);
+        printf("LeftSw:%d  RightSw:%d FloorSensor:%X\r\n",wb.GetLeftSw(),wb.GetRightSw(),bit);
+        leds = bit;
+        wait(0.1);
+    }
+ }
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Sun Jul 28 08:21:57 2013 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/b3110cd2dd17
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wallbot.lib	Sun Jul 28 08:21:57 2013 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/jksoft/code/wallbot/#f8571ffd252a