View: 849|Reply: 4

Rasptank: Could not determine default I2C bus for platform

[Copy link]

1

Threads

1

Posts

11

Credits

Newbie

Rank: 1

Credits
11
Post time 2022-3-1 00:05:38 | Show all posts |Read mode
Edited by 1645975525 at 2022-3-1 12:08 AM

Hi All,
I was trying to debug the servos and nothing happened. Wen I run webServer.py, server.py, serverTest.py and just about anything I get an error like the one below. There are a number of similar problems all over the internet with no clear fix. Can someone please help?

pi@pi:~/adeept_rasptank $ python3 initPosServos.py
Traceback (most recent call last):
  File "/home/pi/adeept_rasptank/initPosServos.py", line 9, in <module>
    pwm = Adafruit_PCA9685.PCA9685()
  File "/usr/local/lib/python3.9/dist-packages/Adafruit_PCA9685/PCA9685.py", line 74, in __init__
    self._device = i2c.get_i2c_device(address, **kwargs)
  File "/usr/local/lib/python3.9/dist-packages/Adafruit_GPIO/I2C.py", line 63, in get_i2c_device
    busnum = get_default_bus()
  File "/usr/local/lib/python3.9/dist-packages/Adafruit_GPIO/I2C.py", line 55, in get_default_bus
    raise RuntimeError('Could not determine default I2C bus for platform.')
RuntimeError: Could not determine default I2C bus for platform


Thanks very much,
James
Reply

Use magic Report

0

Threads

1

Posts

12

Credits

Newbie

Rank: 1

Credits
12
Post time 2022-3-5 02:59:56 | Show all posts
遇到同样的问题!
Reply

Use magic Report

11

Threads

6

Posts

246

Credits

Administrator

Adeept

Rank: 9Rank: 9Rank: 9

Credits
246
Post time 2022-3-8 18:23:41 | Show all posts
It may be due to the incompatibility between the latest image file of raspberry pie and some dependent libraries.
Please try to burn the image file of the official old version of raspberry pie (2021-05-07),
the image download link (zip file):https://downloads.raspberrypi.or ... s_armhf-2021-05-28/]





Reply

Use magic Report

0

Threads

1

Posts

4

Credits

Newbie

Rank: 1

Credits
4
Post time 2022-5-27 10:36:42 | Show all posts
It because Adeept's product does not support latest Raspberry PI 4.

the Adafruit_PCA9685 you are using is a quite old module, which has been deprecated for a long time. In its source code, there is no 'BCM2711' which is being used by Raspberry PI 4, so it cannot recognise Pi 4 at all.

one workaround is edit this file:
/usr/local/lib/python3.9/dist-packages/Adafruit_GPIO/Platform.py

Search:
elif match.group(1) == 'BCM2835':

replace it with:
elif match.group(1) == 'BCM2711':

Reply

Use magic Report

0

Threads

1

Posts

6

Credits

Newbie

Rank: 1

Credits
6
Post time 2022-9-2 23:05:52 | Show all posts
1653618562 replied at 2022-5-27 10:36 AM
It because Adeept's product does not support latest Raspberry PI 4.

the Adafruit_PCA9685 you are us ...

What should I do to edit platform.py?
I was going to edit the file, but contents for change was not saved.
Reply

Use magic Report

You have to log in before you can reply Login | Sign Up

Points Rules