My team is having a large problem with getting the servos to move in our program. We are using robotc. There is a servoTarget[servoname] function and we were wondering if this was the best and/or only way to control the servos? Even when we use this function it does not seem to be very efficient and was not even working in our first attempts to use it.
Well,
You would need to figure out if your problem is physical or code. Set up a single servo and see if the servo changes to the position you want to determine exactly what kind of problem you have.
We tried that but it didn’t work, hence my original question, is it the only way to control the servos? If there is another way to control the servos then we could at least test the servo to see where our problem is. From what I have read the only way to control the servo is servo] and servoTarget] which is just an alias pointing to the servo] function.
To my knowledge, those are the only ways to do the servo position. Uh, let’s try these steps.
-
Check your hardware. Are your motors working? Is everything wired properly? I think your wiring’s funky considering the test Servo did not work.
-
Make sure that you have the proper setup in the motors and servos set up menu in RobotC.
Let me know if either of these work.
our team is having the same problem and we have tried your three steps
If your servos are facing each other, then go ahead and change their direction in the code as well. Because they are going opposite directions, now that they are facing each other. let me know if that solves the problem.
Thanks for the replies but we figured it out…kinda. I don’t know why they didn’t work when we didn’t have our arm attached to them, but in the end our arm was too heavy for the servos to lift so we had to rig it using NXT motors. servoTarget() was the funtion we used and worked pretty well when assisted by the NXT motors