Servo Release Not Working Using (d#,0)


@DJ and Jeremie.

I've been setting up some servos, and I've noticed that the servo release using (for example), Servo(D5,0), the zero is now being treated as a servo holding position as it was before the introduction of zero being a servo release.

I am using the latest EZ Builder version, (2015.09.00), and it was working a few weeks back. I also tried it on a new project with just a single script control, using different ports and EZ-Robot HD servos... same thing.

Any ideas and has anyone else noticed this?



The command to release a servo port is:

Example: Release(D14)

Not what you show above or am I mis-understanding you?

Also, If your using two boards (or did at one time and removed one) make sure your command is pointing to the EZB that the servo you're trying to release is attached to.

Does the "ReleaseAll ( [boardIndex] )" command work for you?



Thanks for responding.

A few months back, DJ made a change to the servo commands and made zero a servo release and 1 being minimum servo position using what I posted above. I'll see if I can find the thread. This is just using one board on a new project.


Here's the link for the release notes...

DJ said zero is release for auto position, but Servo(D#,0) worked as well from this release, and I've been using exactly this command since then in other projects.

It also Kinda says this in the script manual, where it refers to Servo(Port, Position) as servo positions are between 1 and 180.


Oh, sorry, I forgot that one. I've been spending all my time this past year building and not programing. Thanks for the reminder.

Have you tried the the commands I mentioned anyway just to see if the release does work?


No worries. I know you've been VERY busy indeed with your build. (Nice progress BTW).

To answer, no I haven't tried the other commands yet, I just thought I'd post this for the simple fact that it used to work, and now it doesn't, so thought I'd better flag it up to let DJ know. I'll give your advice a go though for now.



I just tried the servo release commands and they are working okay, so I will use them for now but I don't really want to rewrite all of my script commands in all of my projects yet in case there is a fix for the original issue.


Any ideas why servo commands for position zero (outlined in post #1) is no longer working?


Sorry Steve, there has never been the ability to specify a 0 to release the servo from the ez-script Servo() command. The EZ-B's Servo module has a distinct condition that has been there forever which prevents the Servo() command from allowing specified servo positions outside of the ez-b's range. I quickly picked a random code check-in from April 11, 2012 and this code was still there...


/// <summary>
/// The maximum value for a servo (100)
/// </summary>
public static int SERVO_MAX = 180;

/// <summary>
/// The minimum value of a servo (1)
/// </summary>
public static int SERVO_MIN = 1;

if (tmpPosition > SERVO_MAX)
tmpPosition = SERVO_MAX;
else if (tmpPosition < SERVO_MIN)
tmpPosition = SERVO_MIN;


Thanks for responding DJ.

That's a bit embarrassing but weird though, I know I've used 0 in auto position to release servos, but I could have swore that I had used the script command before and it worked. Oh well, thanks for clearing it up anyway. Good to know it's not a bug or anything.


Lol, looks like you were right after all. Maybe it was the auto positioned I was using after all. Can't check as I deleted the project I thought I was using it on.


0 in auto position indeed releases the servo Smile