|
Need help w/ moving Camera Servo motors.
I am trying to move the Camera Servo Motor(Axis 2 - plugged into PWM 5 w/ Jumper) through Joystick 2(USB 2). I want it so when I press button 2, the camera should face down, and when I press button 3, the camera should face up.
I attached my current code for the Camera. Both the Joystick(Joystick 2) and the Servo(Camera Motor) are both initialized in the begin.vi, and both closed in finish.vi. The Camera.vi is being called in Robot Main.vi inside the giant while loop.
Right now, when I run the code, the Servo motor does not move at all, so i decided to debug it by running the code in light bulb mode. What I noticed was that the initial position was 0.00, and after subtracting 1(moving it down), the new position was still 0.00. I don't know why the position is not being updated for every time the loop executes and moves it down.
__________________
Team 1403 Cougar Robotics
2009-2011 Programming Captain
2010
NJ-Regional - Chairmans Award
|