ROBOTC.net forums
http://robotc.net/forums/

servos arnt working properly
http://robotc.net/forums/viewtopic.php?f=52&t=2221
Page 1 of 1

Author:  Skyviper [ Wed Feb 24, 2010 1:11 pm ]
Post subject:  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.....

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/