PiCar and EZBlock problem

I use a raspberry pi 5, ezblock 2.0.2, pcb d04171
wheel motors are working if I use a python script but not with EZBlock, EZBlock is working with sound, distance, video, but not with motors: ErrNo: 6 no such device or address
i2cdetect -y 1 only shows 4,10:14 and nothing on e.g. 0x40

thanx

Could you please provide more information? Does d04171 refer to the hardware version number of the Raspberry Pi?

Are you using the PiCar-X product?

The I2C address of the Robot Hat used by the PiCar-X is indeed 0x14, not 0x40. Which tutorial did you see this address in?

Regarding the motor not working when using Ezblock, where did you see the error message? Could you provide a screenshot? Could you also describe your operations in more detail? What steps did you take, and what exactly happened? A detailed description with some screenshots would be very helpful.

I am PiCar-X user; I have posted screenshots (erros message dialogs,…) to OneDrive: Öffentlich
thanx

From your video, we can see that you are installing all the Python library codes for the PiCar-X product on the Ezblock OS image system. This may cause a conflict.

The PiCar-X product has two different ways to play:

1. Python Control (Coding on Raspberry Pi OS)
This method involves controlling PiCar-X with Python. You need to download and install all the code on the standard Raspberry Pi OS and use Python commands.

2. Ezblock App Control (Requires Special Image)
This method uses the Ezblock app to control the car. It requires you to flash a specific Ezblock OS image onto the SD card for it to connect and work properly with the app.

Therefore, you will need to prepare two separate SD cards and keep the two methods on different cards.


:pushpin: Important Notes for the Ezblock Method

When flashing the custom Ezblock OS image, you must configure the username, password, and most importantly, the WiFi network correctly.

  • Recommended Imager Version: We suggest downloading and using Raspberry Pi Imager v1.9.6 or lower to flash the system. The official v2.0 and above versions have a bug that prevents you from pre-configuring the WiFi network for a custom image.

  • Special Note for Raspberry Pi 5: If you are using a Raspberry Pi 5, you must download the ezblock OS v2.0.2 Beta image. Other versions will not work.

  • After Flashing: Use the imager to configure the OS username, password, and the WiFi network (SSID and password) before writing it to the SD card. Insert the card into the Pi and power it on. If successful, the speaker will make a sound, and you can then connect using the Ezblock Studio app on your phone.

:warning: Critical WiFi Tips for Ezblock

  1. Must be 2.4GHz: The Raspberry Pi and Ezblock have very poor compatibility with 5GHz WiFi. Make sure your router broadcasts a separate 2.4GHz signal (do not combine it with a 5GHz network under the same name).

  2. Simple Characters Only: Use only English letters, numbers, or underscores for your WiFi SSID (name) and password. Avoid special characters, as they can cause connection failures.

thank you, with 2 sd-card it is working now, but →

with Python control you have some samples which do not work: they output:

  • No module named ‘sunfounder_voice_assistant’

  • from picarx.stt import Vosk

  • from robot_hat.stt import *

  • from picarx.tts import Espeak

  • import Piper as _Piper

is there any documentation of the picar, hat, … functions?

Please confirm whether the robot-hat library was successfully installed earlier.

It is recommended to run the following command to update the robot-hat library:
cd ~/robot_hat
git pull origin 2.5.x
sudo pip3 install . --break-system-packages
If the error persists, we suggest reinstalling the system, then installing all the library codes again before running the example to see if it works.

Remember, before installing the libraries, do not run the following command (as shown in the image):
sudo apt install git python3-pip python3-setuptools python3-smbus
Instead, directly proceed with installing robot-hat, vilib, and picar-x.

your script i2samp.sh shows:

ralf@PiCar:~/robot-hat $ sudo sh i2samp.sh
i2samp.sh: 32: Syntax error: “(” unexpected

Please check the command you entered. The correct command for bash should be as follows:

cd ~/robot-hat
sudo bash i2samp.sh

yeah, that works.
is there any documentation of the picar, robot-hat, … functions?

For Robot HAT functions, please refer to: