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
--- /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
--- /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
--- /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);
+    }
+}
--- /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