ikarashi kunn----- nya---

Dependencies:   MotorDriverController mbed

Files at this revision

API Documentation at this revision

Comitter:
WAT34
Date:
Thu Jul 13 10:03:43 2017 +0000
Commit message:
move????;

Changed in this revision

MotorDriverController.lib Show annotated file Show diff for this revision Revisions of this file
constants.h 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 0c5a2df4bdb6 MotorDriverController.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MotorDriverController.lib	Thu Jul 13 10:03:43 2017 +0000
@@ -0,0 +1,1 @@
+http://developer.mbed.org/teams/NHK-Robocon2016_Nagaoka_B_Team/code/MotorDriverController/#1f57a3c2d28b
diff -r 000000000000 -r 0c5a2df4bdb6 constants.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/constants.h	Thu Jul 13 10:03:43 2017 +0000
@@ -0,0 +1,5 @@
+//constants.h
+//Robot constants
+//author: Wataru Nakata
+
+int i2cSda = 8, i2cScl =9;
\ No newline at end of file
diff -r 000000000000 -r 0c5a2df4bdb6 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Jul 13 10:03:43 2017 +0000
@@ -0,0 +1,37 @@
+#include "mbed.h"
+#include "MotorDriverController.h"
+#include "constants.h"
+
+MDC motors[4];
+
+int main() {
+    for(int i = 0; i < 4;i++)
+    {
+        motors[i].setAddr(0,i);
+    }  
+    while(true) {
+        motors[0].write(0.7);
+        motors[1].write(-0.7);
+        motors[2].write(0);
+        motors[3].write(0);
+        
+        wait(2);
+        motors[0].write(0);
+        motors[1].write(0);
+        motors[2].write(0.7);
+        motors[3].write(-0.7);
+        
+        wait(2);
+        motors[0].write(0.7);
+        motors[1].write(0.7);
+        motors[2].write(0.7);
+        motors[3].write(0.7);
+        wait(2);
+        
+        motors[0].write(-0.7);
+        motors[1].write(-0.7);
+        motors[2].write(-0.7);
+        motors[3].write(-0.7);
+        wait(2);
+    }
+}
diff -r 000000000000 -r 0c5a2df4bdb6 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu Jul 13 10:03:43 2017 +0000
@@ -0,0 +1,1 @@
+https://mbed.org/users/mbed_official/code/mbed/builds/22da6e220af6
\ No newline at end of file