SERVO OFF Syntax error

alpacaman

Member
Can someone please advise me of the syntax for this command?
The manual simply states: SERVO OFF.
I'm using version 5.2.0 editor software.
 

hippy

Ex-Staff (retired)
No idea. "SERVO OFF" and "SERVO pin,OFF" doesn't work with any of the PICAXE compilers I tried.
 

BCJKiwi

Senior Member
Maybe it is;
servo pin off
Like it is for pwmout - see recent discussion.
manual also suggests
pin high
or
pin low
will turn off the servo pulsing.
 

Technical

Technical Support
Staff member
This is a documentation mistake, this was planned but not implemented yet.
A 'low pin_number' command will do the same job.
 

alpacaman

Member
I tried just making the servo pin high or low and it does trun the servo off. However, the servo moves when you do this and sometime hits a switch which I don't want it to. I was hoping that the servo off command wouldn't have this effect - but I'm guessing that it will.
 

hippy

Ex-Staff (retired)
If you stop controlling the servo there's no saying what it may do ( like closing your eyes, taking your hands of the handle bars and not pedalling while cycling ).

Why do you need to turn the servo 'off' and what are you trying to achieve ?
 

alpacaman

Member
hippy - I made a digital clock with 4 large (2.5") 7-segment readouts. The difference in this clock is that each digit is advanced by pressing a mico-switch. I have one servo which turns right to advance the minutes-units and it turns left to advance the minutes-tens. There's another servo which does the same for the hours. When the time isn't advancing then the servo sit between the switches.

Everything works except there is a jitter in the servos. Since one servo only moves once a minute, and the other one once an hour, I thought I'd turn them off between use to remove the jitter.

I'm using the servopos command to reposition the servos. I think the jitter is because I have an interrupt routine which is triggered 60 times/second - timing for the clock.

The servos are on a seperate regulated power source and I have the proper capacitor across the picaxe.

The clock works the way it is but the jitter is a little annoying.
 

hippy

Ex-Staff (retired)
It may investigateing why there's jitter. I wouldn't have expected an interrupt to to stop servo working how it's meant to, but taht could depend upon what you do within the interrupt.
 

Wrenow

Senior Member
Have you tried manually generating the servo pulse with pulsout and the appropriate pause? You only need 3 different pulsout conditions - left position, right position, and centered.

Another possibility is to forego the servo altogether and use a couple of TeamDelta r/c signal switches.

Cheers,

Wreno
 
Top