Problems with the ThreeServoPositions.bs2 and the ServoControlWithDebug.bs2
robofan301
Posts: 4
I have been working through the "What is a Microcontroller?" tutorial and everything was going great until I got to the Servo motors.
The ThreeServoPositions.bs program has the servo hold three different positions for 3 seconds. However, instead of doing that, It runs the 45o position 3 times, then quickly does 90o and jumps back to the 45o. This goes on indefinitely until I cut power from the servo to Vdd. Once I do that it executes the remainder of the program. It seems to be getting feedback from the Servo that is making it start over, before it is finished the loops. Today I tried to run the program that has the user type in the Pulsout data and rotate it to different positions. However, as soon as I hit 1 digit, it automatically jumps through the remainder of the program. Meanwhile the servo remains locked in 1 position, until I cut power to it.
Has this happened to anyone else, working through the tutorials? Could it be a bad servo?
I am using the Parallax servo that came with the Basic Stamp HomeWork Board Kit.
Thanks
The ThreeServoPositions.bs program has the servo hold three different positions for 3 seconds. However, instead of doing that, It runs the 45o position 3 times, then quickly does 90o and jumps back to the 45o. This goes on indefinitely until I cut power from the servo to Vdd. Once I do that it executes the remainder of the program. It seems to be getting feedback from the Servo that is making it start over, before it is finished the loops. Today I tried to run the program that has the user type in the Pulsout data and rotate it to different positions. However, as soon as I hit 1 digit, it automatically jumps through the remainder of the program. Meanwhile the servo remains locked in 1 position, until I cut power to it.
Has this happened to anyone else, working through the tutorials? Could it be a bad servo?
I am using the Parallax servo that came with the Basic Stamp HomeWork Board Kit.
Thanks
Comments
Also, the ServoControlWithDebug still was not working correctly, so I went back and checked the code.
It turns out that I forgot to put the formatter "DEC" in front of the variable "duration", so it must have been reading it as a bit.
Thanks for all of the help and the rapid response.