View Full Version : Method not working how expected

05-31-2010, 02:35 AM
I have this method

Pri ControlESC | value
Debug.Str(String(13, "Calibrating Mamba25 ESC complete!"))
Debug.Str(String(13,"Enter a ESC value 1810 = Full throttle, 1479 = Nuetral/Full Brake, 1048 = Full reverse: "))
value := Debug.getDec
servo.set(escPin, value)
Debug.Str(String("You Entered: "))

When I input a value in the PST the ESC doesnt respond, but the number comes up on the PST. Attached is the complete code.


05-31-2010, 03:12 AM
Don't know enough about the Servo-object, but here are some thoughts that might help to find the problem by yourself.

Are you sure that it expects the pin number? Maybe it expects the bitmask.
Or ... are you sure that you use the right pin number? The numbers go from 0 to 31 and not from 1 to 32 as one might think. So, the last port-pin on the left side of a DIP-propeller is 15.

Don't you have to initialize the servo-object?

05-31-2010, 04:37 AM
I was reading in the servo32v7 object you didnt have to, but I added servo.start, and it started to perfom as I expected.