MX28IDcheck

Dependencies:   MX28 mbed

Files at this revision

API Documentation at this revision

Comitter:
kikutake
Date:
Thu Oct 08 08:33:35 2015 +0000
Commit message:
MX28IDcheck

Changed in this revision

MX28.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.lib Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MX28.lib	Thu Oct 08 08:33:35 2015 +0000
@@ -0,0 +1,1 @@
+http://developer.mbed.org/users/GIPetrou/code/MX28/#85216442d3ef
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Oct 08 08:33:35 2015 +0000
@@ -0,0 +1,19 @@
+#include "mbed.h"
+#include "MX28.h"
+
+Serial pc(USBTX,USBRX);  /*パソコンとの通信*/
+MX28 mx28(p13,p14,57600);
+
+int main() {
+    pc.baud(57600);
+    
+    while(1){
+    for(int ID=1;ID<=5;ID++){
+    mx28.SetMovingSpeed(ID,0x0010);
+    mx28.SetGoalPosition(ID,0x00F0);
+    wait(0.5);
+    mx28.SetGoalPosition(ID,0x0FFF);
+    wait(0.5);
+    }
+    }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.lib	Thu Oct 08 08:33:35 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/gokmenascioglu/code/mbed/#a8fa94490a0a