|
Page 1 of 1
|
[ 1 post ] |
|
servos arnt working properly
| Author |
Message |
|
Skyviper
Rookie
Joined: Tue Jan 13, 2009 12:24 pm Posts: 10
|
 servos arnt working properly
#pragma config(Servo, srvo_S4_C1_1, aim, tServoNormal) #pragma config(Servo, srvo_S4_C1_2, trig, tServoNormal) #include "JoystickDriver.c" task main() { while (1==1) {
// shooter controls
if(joy2Btn (6)) // load { motor[load] = -100; } if(joy2Btn (3)) // stop load { motor[load] = 0; } if(joy2Btn (2)) // load for shooting { motor[load] = -30; }
if(joy2Btn (8)) // shoot { motor[shoot] = -100; } if(joy2Btn (4)) // shooter stop { motor[shoot] = -0; } if(joy2Btn(1)) // aim shooter { servo[aim] = 100; servo[trig] = 10; } if(joy2Btn(7)) // trigger to hold balls { servo[trig] = 120; servo[aim] =20; } }
this is the current configuration im stuck using because when i have only one servo programmed like this while (1==1) { if(joy2Btn(1)) // aim shooter { servo[trig] = 120; } } } servo aim still responds and ive tried switching servo controllers, both are brand new and dont work idk if its the code or not. and just now when i try and configure the servos all of a sudden what ever i configure in motor and sensor setup doesnt get written, im having to copy the #pragma config(Servo, srvo_S4_C1_2, trig, tServoNormal) from another file.....
|
| Wed Feb 24, 2010 1:11 pm |
|
|
|
Page 1 of 1
|
[ 1 post ] |
|
Who is online |
Users browsing this forum: No registered users and 4 guests |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|