MX28IDcheck
Revision 0:4d6b7e99b6fe, committed 2015-10-08
- Comitter:
- kikutake
- Date:
- Thu Oct 08 08:33:35 2015 +0000
- Commit message:
- MX28IDcheck
Changed in this revision
diff -r 000000000000 -r 4d6b7e99b6fe MX28.lib --- /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
diff -r 000000000000 -r 4d6b7e99b6fe main.cpp --- /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
diff -r 000000000000 -r 4d6b7e99b6fe mbed.lib --- /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