It is a test program of wallbot library.

Dependencies:   mbed wallbot

Revision:
0:ce9fda861f9e
--- /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