Page 3 of 3

Re: Servo MoveToAngle

Posted: Sat Sep 26, 2026 10:21 am
by medelec35
Whenever I have fixed a component I would prefer who reports it to test the component to make sure they are happy with it.
When they are I will then class it as fixed.
Until then, I don't.

Re: Servo MoveToAngle

Posted: Sat Sep 26, 2026 11:00 am
by chipfryer27
Hi Martin

I was giving you a compliment :)

I will be heading in to Evil Lab around lunchtime and will let you know how I get on later.

Regards

Re: Servo MoveToAngle

Posted: Sat Sep 26, 2026 1:02 pm
by chipfryer27
Hi Martin

Using your latest component and with Angle set to default 180, the servo now moves.

Values similar to before as measured on a virtual scope.

0 = 1mS
45 = 1.25mS
90 = 1.49mS
135 = 1.73mS
180 = 1.99mS

The calibration angle feature seems to work fine too as I tried a different value.

Big thanks to both you and Ben.

Regards

Re: Servo MoveToAngle

Posted: Sat Sep 26, 2026 7:41 pm
by chipfryer27
Hi

As I am using a cheapo servo obtained from a cheap source familiar to all, I had to play with the Min / Max width values to get it to work as described. It claimed to be a 120 degree motor but I could easily exceed that by tens of degrees. I did only want 120 degrees, which is why I purchased, but it took no time at all to adjust the values to give me the desired rotation.

I used the new feature to set the calibration value to 120, then when I told it to MoveToAngle = 60 it rotated by 50%...:)

Regards

Re: Servo MoveToAngle

Posted: Sat Sep 26, 2026 9:03 pm
by medelec35
Hi Iain.
Thanks for the compliment :)
chipfryer27 wrote: ↑
Sat Sep 26, 2026 7:41 pm
but it took no time at all to adjust the values to give me the desired rotation.
I'm glad the new features Ben added and my changes combined are working well.
Thanks for letting us know.
At least you now have a working solution :)

Re: Servo MoveToAngle

Posted: Sat Sep 26, 2026 9:25 pm
by chipfryer27
Hi Martin

In my application using the 120 degree rotation, I initially set it for 60 degrees (50% of rotation) then allow to be adjusted by +/- degree at a time.

I used an engineering set square against the fixed base and adjusted the servo so that at 60 degrees it was at a right angle, giving +/- 60 degrees of rotation.

The MoveToPosition macro from previous version did work, but now being able to move to an angle is a very nice feature and coupled with the ability to set the degrees of rotation (Calibration macro) makes things so much more user friendly.

Bring too lazy (way, way too lazy) to get out my proper scopes, I used my virtual one to check pulse widths and they were pretty much as expected through the range of rotation.

Thanks again for fixing this.

Regards

Re: Servo MoveToAngle

Posted: Mon Sep 28, 2026 4:13 pm
by BenR
The new library update should hopefully include all of Martin's fixes plus an additional missing setAngle to jump directly to the angle you want rather then having to use the move / automove functions.

We were also at loggerheads a bit over a 32 bit vs 16 bits calculation variable and I think we have managed to get the 16-bit version working correctly so the ROM usage and thinking time should be a fair bit lower on our friendly 8-bit devices.

Re: Servo MoveToAngle

Posted: Mon Sep 28, 2026 4:24 pm
by chipfryer27
Thanks Ben

I'll check new update when I next get a chance.

The new calibration feature is a good addition.

My needs for it are quite modest, being able to go to an angle (or close enough on 8-bits), repeatedly, more than meets my requirements.

Regards