-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed to run the command "sudo python Servo.py" #28
Comments
The previous pictures make me confused. The first pic shows The second pic shows Would you please tell me which connect method is right? |
The issue may be on your Raspberry Pi. |
I don't have other control board. In your mind which board is easier to do such test. I have poor knowledge about it. Thank you |
You can buy an Arduino board. BTW, you can connect the Raspberry Pi back to the robot board without the mpu6050 chip connected and run i2cdetect -y 1 again to see if it can detect the i2c addresses of other chips. |
When I run the command Servo.py. I get the following error:
Now servos will rotate to 90°.
If they have already been at 90°, nothing will be observed.
Please keep the program running when installing the servos.
After that, you can press ctrl-C to end the program.
Traceback (most recent call last):
File "/home/pi/Freenove_Robot_Dog_Kit_for_Raspberry_Pi/Code/Server/Servo.py", line 28, in
S=Servo()
^^^^^^^
File "/home/pi/Freenove_Robot_Dog_Kit_for_Raspberry_Pi/Code/Server/Servo.py", line 8, in init
self.pwm = PCA9685(address=0x40, debug=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/pi/Freenove_Robot_Dog_Kit_for_Raspberry_Pi/Code/Server/PCA9685.py", line 32, in init
self.write(self.__MODE1, 0x00)
File "/home/pi/Freenove_Robot_Dog_Kit_for_Raspberry_Pi/Code/Server/PCA9685.py", line 36, in write
self.bus.write_byte_data(self.address, reg, value)
OSError: [Errno 5] Input/output error
I use the command "sudo i2cdetect -y 1" to get connected device information. It shows there is no valid device.
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
I am sure I already enabled i2c and reboot system multiple times.
If you need more information, please let me know.
The text was updated successfully, but these errors were encountered: