Python Adafruit_BBIO's maximum speed

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
aly.yousuf7
 
Posts: 1
Joined: Fri Jan 03, 2014 3:16 pm

Python Adafruit_BBIO's maximum speed

Post by aly.yousuf7 »

Hello,

I'm working on Beaglebone for a robotic project. Currently i'm writing a code to get moto's position using encoders.
It is working fine on slow motor speed. But the problem starts when motor speed is fast. I believe, it is due to the processing speed of Adafruit's BBIO Library and Python.

So does anyone has any idea how fast Python Adafruit_BBIO Library can go?
And any suggestion for any faster library in any other language? C++ maybe.

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: Python Adafruit_BBIO's maximum speed

Post by adafruit_support_mike »

Python is an interpreted language, so it has a lot more overhead than the binaries generated by a C compiler. To find the actual difference, you'd need to write programs that do the same general thing in both languages, loop them over a set of standard operations a few hundred or thousand times, and count the elapsed time for each.

User avatar
paulf8080
 
Posts: 208
Joined: Sat Jan 18, 2014 10:25 pm

Re: Python Adafruit_BBIO's maximum speed

Post by paulf8080 »

Just curious. Are you reading the encoder value a gpio pin at a time. If so, the encoder value can change before all pin reads are completed. Is there a way to read all the pins at once. The HW supports 32 pin groups. You may have to add an external register to capture all encoder pins at once.

Locked
Please be positive and constructive with your questions and comments.

Return to “Beagle Bone & Adafruit Beagle Bone products”