Method not working how expected
bboy8012
Posts: 153
I have this method
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.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Pri ControlESC | value Debug.tx(16) Debug.Str(String(13, "Calibrating Mamba25 ESC complete!")) repeat 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: ")) Debug.Dec(value)
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.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
spin
1K
Comments
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?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔