|
发表于 2013-5-6 20:40:19
|
显示全部楼层
robotStudio 发表于 2013-5-6 18:49
那你就在p1口接两个舵机不就行了。。。
case 1: servo0=1; TH0=-pwm[0]>>8; TL0=-pwm[0]; break;
case 2: servo0=0; TH0=-(ms2_5Con-pwm[0])>>8; TL0=-(ms2_5Con-pwm[0]); break;
case 3: servo1=1; TH0=-pwm[1]>>8; TL0=-pwm[1]; break;
case 4: servo1=0; TH0=-(ms2_5Con-pwm[1])>>8; TL0=-(ms2_5Con-pwm[1]); break;
case 5: servo2=1; TH0=-pwm[2]>>8; TL0=-pwm[2]; break;
case 6: servo2=0; TH0=-(ms2_5Con-pwm[2])>>8; TL0=-(ms2_5Con-pwm[2]); break;
case 7: servo3=1; TH0=-pwm[3]>>8; TL0=-pwm[3]; break;
case 8: servo3=0; TH0=-(ms2_5Con-pwm[3])>>8; TL0=-(ms2_5Con-pwm[3]); break;
case 9: servo4=1; TH0=-pwm[4]>>8; TL0=-pwm[4]; break;
case 10: servo4=0; TH0=-(ms2_5Con-pwm[4])>>8; TL0=-(ms2_5Con-pwm[4]); break;
case 11: servo5=1; TH0=-pwm[5]>>8; TL0=-pwm[5]; break;
case 12: servo5=0; TH0=-(ms2_5Con-pwm[5])>>8; TL0=-(ms2_5Con-pwm[5]); break;
case 13: servo6=1; TH0=-pwm[6]>>8; TL0=-pwm[6]; break;
case 14: servo6=0; TH0=-(ms2_5Con-pwm[6])>>8; TL0=-(ms2_5Con-pwm[6]); break;
case 15: servo7=1; TH0=-pwm[7]>>8; TL0=-pwm[7]; break;
case 16: servo7=0; TH0=-(ms2_5Con-pwm[7])>>8; TL0=-(ms2_5Con-pwm[7]); break;
这些什么意思 如果我只用两路 其他servo可以删掉吗 |
|