Abe Takumi
/
RS405CB_test
meister2013 control test program
Embed:
(wiki syntax)
Show/hide line numbers
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 }
Generated on Sat Aug 6 2022 14:04:56 by 1.7.2