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.
Servo MoveToAngle
-
medelec35
- Valued Contributor
- Posts: 2452
- http://meble-kuchenne.info.pl
- Joined: Wed Dec 02, 2020 11:07 pm
- Has thanked: 792 times
- Been thanked: 850 times
-
chipfryer27
- Valued Contributor
- Posts: 2131
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 478 times
- Been thanked: 712 times
Re: Servo MoveToAngle
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
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
-
chipfryer27
- Valued Contributor
- Posts: 2131
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 478 times
- Been thanked: 712 times
Re: Servo MoveToAngle
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
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
-
chipfryer27
- Valued Contributor
- Posts: 2131
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 478 times
- Been thanked: 712 times
Re: Servo MoveToAngle
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
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
-
medelec35
- Valued Contributor
- Posts: 2452
- Joined: Wed Dec 02, 2020 11:07 pm
- Has thanked: 792 times
- Been thanked: 850 times
Re: Servo MoveToAngle
Hi Iain.
Thanks for the compliment
Thanks for letting us know.
At least you now have a working solution
Thanks for the compliment
I'm glad the new features Ben added and my changes combined are working well.chipfryer27 wrote: ↑Sat Sep 26, 2026 7:41 pmbut it took no time at all to adjust the values to give me the desired rotation.
Thanks for letting us know.
At least you now have a working solution
Martin
-
chipfryer27
- Valued Contributor
- Posts: 2131
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 478 times
- Been thanked: 712 times
Re: Servo MoveToAngle
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
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
-
BenR
- Matrix Staff
- Posts: 2313
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 642 times
- Been thanked: 850 times
Re: Servo MoveToAngle
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.
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.
-
chipfryer27
- Valued Contributor
- Posts: 2131
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 478 times
- Been thanked: 712 times
Re: Servo MoveToAngle
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
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