Dependencies:   TA8428 mbed

Files at this revision

API Documentation at this revision

Comitter:
ogata_lab
Date:
Wed May 29 13:03:46 2013 +0000
Commit message:
first commit

Changed in this revision

TA8428.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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/TA8428.lib	Wed May 29 13:03:46 2013 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/ogata_lab/code/TA8428/#655b0ede301b
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Wed May 29 13:03:46 2013 +0000
@@ -0,0 +1,25 @@
+#include "mbed.h"
+#include "TA8428.h"
+
+DigitalIn sw01(p19);
+TA8428 driver(p21, p22);
+
+bool old_sw = false;
+bool direction_cw = true;
+
+int main() {
+    while(1) {
+      bool new_sw = sw01 == 0;
+      if (!old_sw && new_sw) {
+        direction_cw = !direction_cw;
+      }
+      old_sw = new_sw;
+      
+      if (direction_cw) {
+        driver.drive(0.5);
+      } else {
+        driver.drive(-0.5);
+      }
+    
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Wed May 29 13:03:46 2013 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/b3110cd2dd17
\ No newline at end of file