Picar-X motors run in opposite directions when using EzBlock

I followed the instructions using the custom image for EzBlock, and can connect to the Picar-X just fine using EzBlock Studio. in EzBlock Studio I can calibrate the camera tilt and pan, and the steering servo. However, when I try to move the car forward with any of the example scripts, the right motor is spinning the wrong way.

I’m running EzBlock Studio v3.2.145. The Picar-X says it is running 1.2.4.

We recommend that you prepare a new SD card, install the Raspberry Pi system, and install our Python code base on the Raspberry Pi system terminal:
https://docs.sunfounder.com/projects/picar-x/en/latest/python/python_start/install_all_modules.html
Then go ahead and execute the calibration.py code to calibrate the direction of the motor:
https://docs.sunfounder.com/projects/picar-x/en/latest/python/python_calibrate.html
See if that solves the problem. If there is something you don’t understand, please describe it in detail, and provide us a video of the problem if you can, so that we can easily analyze and solve the problem.

Thanks for the quick response!

I actually already did that (I started with Python, but then discovered EzBlock Studio doesn’t work on the image used to play with Python, so I switched to the EzBlock OS image).

When using Python, I was able to calibrate the direction of the motor, and all was well. However, I then switched to the EzBlock OS image, and it had forgotten the calibration. There is no option to calibrate the motor direction in the EzBlock Studio app, and I really want to use that app to play with the robot with my daughter.

Could you help me understand how the motor direction calibration can be ported from the Python image to the EzBlock image? Is there maybe a file I can edit on the EzBlock image?

Under normal circumstances, after you calibrate the motor direction in Python control, when you switch ezblock APP control, the direction of the motor is also confirmed.
If the direction of motor movement between your Python control and ezblock control is not consistent, please provide a video of the problem to us, so that we can analyze and solve the problem.
You can replace the motor interface to try, and then go to run the move example to see how it works. (ezblock)

I got a second SD card, and now have both images readily available. I created this video that demonstrates that, if I fix the motor direction on the Python image, it is still a problem on the EzBlock image.

Not shown in the video is that, when I go back to the Python image, it does remember the calibration, and the car runs fine. To me it seems the motor direction calibration is stored on the image, not anywhere else.

This is an issue we need some time to test to reproduce and will update you with the results.

Thanks!

After looking back at my own video, I noticed that the red and black wires were really switched on the two motors, so I switched them on the right motor with my soldering iron. Now I don’t need the calibration anymore.

After you switch the red and black wires of the motor, does the motor work correctly in python control.
Is the motor working fine in ezblock control?

Yes, after switching the wires everything works fine both through Python and EZBlock.

1 Like

Hi there, I’m having the exact same issue with my Picar-X and similar to schuemie it looks like the wires are reversed on one of my motors. I’m also using EZBlock. Is there any way to correct this without reflashing my SD card to Python? Is there a config file I can edit? Unfortunately I don’t have a soldering gun to fix this.

You don’t need to solder anything. You can simply swap the positions of the wires on the motor’s connector.
Please refer to the video: https://1drv.ms/v/s!As4abzxu6AMwg0o5wjnatPAkVwNT?e=TYMITp