Okay I am not sure how to program the servo, I have a servo plugged into the digital sidecar on PWM #3, and I am not sure how to program it moving so this is the code that we have, so could you tell us our problem?
Code:
#include "WPILib.h"
#include "xmath.h"
class RobotDemo : public SimpleRobot
{
RobotDrive myRobot;
Joystick leftstick;
Joystick rightstick;
Servo servo;
public:
RobotDemo(void):
myRobot(1, 2, 3),
leftstick(1),
rightstick(2),
servo(3)
{
GetWatchdog().SetExpiration(100);
}
void Autonomous(void)
{
GetWatchdog().SetEnabled(false);
//CODE
}
void OperationControl(void)
{
Servo(3);
GetWatchdog().SetEnabled(true);
while(IsOperatorControl())
{
servo.Set(170.0);
GetWatchdog().Feed();
}
}
};
So any suggestions?