Olimex Support Forum

OLinuXino Android / Linux boards and System On Modules => A20 => Topic started by: faraz on May 12, 2022, 07:11:01 am

Title: Servo control using A20-OLinuXino-LIME2 and Lime2 Shield
Post by: faraz on May 12, 2022, 07:11:01 am
Hey
I am trying to control a servo motor using PWM output on GPIO267 or Pin 11 of the Lime2 Shield.

At this stage I would even connect directly to the PB2 or PI3. I am not using any LCD as well.

Has anyone successfully controlled a servo using any of the all winner chips or olimex boards using python?
Title: Re: Servo control using A20-OLinuXino-LIME2 and Lime2 Shield
Post by: LubOlimex on May 12, 2022, 09:42:36 am
We've used PWM successfully on many occasions. The backlight of all LCDs that we sell also uses PWM, without PWM they won't work. Did you enable PWM from olinuxino-overlay?
Title: Re: Servo control using A20-OLinuXino-LIME2 and Lime2 Shield
Post by: faraz on May 13, 2022, 07:54:00 am
Hey LubOlimex.

Yes the PWM is enabled in the over lay.
I cannot find any documentation on how to use the PWM.

Will I be able to generate the PWM signal on any GPIO pin? or do I have to use the dedicated PWM?

Just visited the other thread with your reply.

leaving the link here as well for anyone that searches with the same subject.
Thanks!

https://www.kernel.org/doc/html/v5.10/driver-api/pwm.html
Title: Re: Servo control using A20-OLinuXino-LIME2 and Lime2 Shield
Post by: faraz on May 16, 2022, 09:50:24 am
Hey LubOlimex,

Could you please share scripts/codes to manipulate LCDs?
Also, how do I enable pwm1? or know if its enabled?

I am using lime2 shield and only PWM1 is routed to the shield.

Able to partially solve.  Anyone interested can see more at

https://www.olimex.com/forum/index.php?topic=7850

Now if someone can tell me, if i can route the hardware pin to different ports. that would be great!. lol