Pololu Robotics & Electronics
Menu
My account Comments or questions? About Pololu Contact Ordering information Distributors

Pololu Forum

Raspberry Pi 4B and tensorflow lite project

Hello!

I am trying to do an object detection and tracking project using raspberry pi 4B, a raspberry pi camera v2.1, two servos and the pololu micro maestro 6 channel. For software I am using tflite and opencv. When I run my code the motors are unresponsive and sometimes the module show an error by having the red led on and steady and the yellow one blinking (I know that this is a soft reset problem).
What can be wrong with it? The code is running without problems.

Thank you!

-Laura

Hello, Laura.

Does your Maestro run properly if you control it over USB using our Maestro Control Center software? Can you post some pictures of your setup and tell me what power supply and servos you are using?

Also, if the Maestro Control Center reports errors (under the “Errors” tab) can you tell us what it reports?

- Patrick

Hello!

I’ve solved the problem(. But now I have another. I set the limits: 1552 & 2208 (for one motor) and 1920 & 2208 ( for the other) and I’ve noticed that the motors are moving less than these limits? Do you know why? I am powering my module thru a LiPO JTS connector from my computer/ battery bank.

Also, can you tell me why I have to multiply by 4 my limits ( the ones that I set in Maestro Control center)?

Thank you!

I am glad to hear you solved that problem.

If you are trying to control the Maestro with your Raspberry Pi and are having trouble moving the servos through the entire range you configured, then it is probably a code problem. Are you setting those limits in the control center or in your Raspberry Pi code? My suggestion would be to try to isolate the problem to simplify the code to the most basic program that should work, but does not. At that point if you cannot figure out what the problem is, you are welcome to post your code and I can take a look.

Many of the servo related commands for the Maestro scripting language and for the serial interface use arguments where the servo signal pulse width is set in quarter-microsecond units. That is why you have to multiply by four from the values you set in the “Status” or “Channel Settings” tabs in the Maestro Control Center, where the values are in microseconds. The arguments for the scripting language and serial commands cannot be decimal values, so using quarter-microsecond units instead still gives you access to the most precise control possible with the Maestro.

You can learn more about the serial servo commands in the “Serial Servo Commands” section of the Maestro user’s guide. Similarly, you can learn more about the scripting language commands in “The Maestro Scripting Language” section, specifically in the “Command Reference” subsection.

- Patrick

1 Like