meister2013 control test program

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "mbed.h"
00002 //header to use rs405cb class
00003 #include "RS405cb.h"
00004 
00005 //make object
00006 RS405cb servo(p28,p27,p21);//TX,RX,PERMIT  (PERMIT means RE/DE Pin of ltc485)
00007 
00008 //main
00009 int main() {
00010     TORQUE_ON(1); //means "make torque on of servo whose id is 1." 
00011     while(1) {
00012         Rotate_Servo_Float(1,-90.0);//means "change angle to -90.0 degree :ID=1"    angle scope:-90.0 to -90.0    
00013         wait(1.0);
00014         Rotate_Servo_Float(1,0.0);
00015         wait(1.0);
00016         Rotate_Servo_Float(1,90.0);
00017         wait(1.0);
00018         Rotate_Servo_Float(1,0.0);
00019         wait(1.0);
00020     }
00021 }