Servo Motor on A64 board using python

Started by NickSterg, November 27, 2017, 09:49:56 PM

Previous topic - Next topic

NickSterg

Hello !

I'm currently working on a project and I'm trying the A64 board. I need to use a servo motor and move it in exact degrees.
I tried the AngularServo from the Gpiozero library but it seems it searches for an RPi to work, which is kinda impossible!
Does anyone have any idea about how can I do that? Any library or smthing to work things out?

Thank you in advance !

LubOlimex

Haven't seen something exactly like this, but for general GPIO control you can use the recently published Python library for the A64 board. It is available here: https://pypi.python.org/pypi/pyA64/0.1.0
Technical support and documentation manager at Olimex

NickSterg

We already figured out how to use the GPIOs. The thing is i can't make a servo motor move into a specific angle. I can only move it 0 and 180 degrees.
The thing is we had a program using to move motors in a RPi and we are changing the board to olimex. The library we used to move the servo motor is not working properly. I get an error where it can't determine the RPi revision. Also got some errors "cannot detect the GPIO".
IF anybody has an any idea about how to move a servo motor using python in olimex, cause we have problems.


JohnS

The hardware is different so someone needs to change the software (which apparently was only written for RPi) - if it is allowed (check the licence for the lib you refer to).

Maybe you change it or get someone else to do it.  Standard for all things really.

John

LubOlimex

<<< We already figured out how to use the GPIOs. The thing is i can't make a servo motor move into a specific angle. I can only move it 0 and 180 degrees.

I see a number of servo libraries and examples that can be adapted once you know how to use GPIOs. Probably these can be adapted.

Once specific thing to consider is that you need to use code that uses software PWM (opposed to hardware PWM). This should be relatively easy since you already know how to use the GPIOs. I believe hardware PWM is very limited option since A64 has only one PWM.

Technical support and documentation manager at Olimex

NickSterg

Do you have any library that uses software PWM),  in mind that may work properly in a64 ??

Brian


JohnS

If you use the Olimex Linux it says it's already installed so no need to build.

Is it not there or what?

John

Brian

Not. Is not included yet, but i downloaded the latest image and everything builds just fine. Looking at the oscilloscope seems to be ok. Will test tomorrow with servos. 

JohnS

Ye gods!  It's stupid and irresponsible for the author to say it is there if it isn't!  (Are you sure it's not?)

John