I purchased the SunFounder Robot Car Kit for Raspberry Pi, which includes a 4WD HAT Module. However, I’m having issues running the picar-4wd commands.
I installed the recommended Raspberry Pi OS, connected the 4WD HAT to my Raspberry Pi 4 B, and then attempted to run the test commands: picar-4wd test motor
I received the following error:
File "/usr/lib/python3/dist-packages/smbus2/smbus2.py", line 496, in write_word_data
ioctl(self.fd, I2C_SMBUS, msg)
OSError: [Errno 5] Input/output error.
1.What version of the system are you currently using? The Bookworm version is currently not compatible with Picar-4WD; we recommend using the Legacy version instead.
2.Did you encounter any errors while installing the Picar-4WD software code? If so, please provide a screenshot of the error.
3.Please run the command sudo i2cdetect -y 1 and send us a screenshot of the printed information.
Before that, please ensure that I2C is enabled by running the command sudo raspi-config to enable I2C.