Skip to content
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

Using Adafruit_CircuitPython_ServoKit in a container #31

Open
mmatesic01 opened this issue Aug 15, 2021 · 1 comment
Open

Using Adafruit_CircuitPython_ServoKit in a container #31

mmatesic01 opened this issue Aug 15, 2021 · 1 comment

Comments

@mmatesic01
Copy link

Hello,
I have no issues installing and enabling and using Adafruit_CircuitPython_ServoKit locally (outside container) on Jetson Nano.
I run this simple code (and servos move):

from adafruit_servokit import ServoKit

_kit = ServoKit(channels=16)
pan = 90
tilt = 90

kit.servo[0].angle = pan
kit.servo[1].angle = tilt_

But when installing it inside container and running the same code, I get the next message:

_Traceback (most recent call last):
File "/home/marko/Desktop/pyProg/NVIDIA/servotest.py", line 1, in
from adafruit_servokit import ServoKit
File "/usr/local/lib/python3.6/dist-packages/adafruit_servokit.py", line 35, in
import board
File "/usr/local/lib/python3.6/dist-packages/board.py", line 33, in
from adafruit_blinka.agnostic import board_id, detector
File "/usr/local/lib/python3.6/dist-packages/adafruit_blinka/agnostic/init.py", line 18, in
chip_id = detector.chip.id
File "/usr/local/lib/python3.6/dist-packages/adafruit_platformdetect/chip.py", line 350, in getattr
if self.id == attr:
File "/usr/local/lib/python3.6/dist-packages/adafruit_platformdetect/chip.py", line 350, in getattr
if self.id == attr:
File "/usr/local/lib/python3.6/dist-packages/adafruit_platformdetect/chip.py", line 350, in getattr
if self.id == attr:
[Previous line repeated 320 more times]
File "/usr/local/lib/python3.6/dist-packages/adafruit_platformdetect/chip.py", line 154, in id
self._chip_id = self._linux_id()
File "/usr/local/lib/python3.6/dist-packages/adafruit_platformdetect/chip.py", line 235, in linux_id
hardware = self.detector.get_cpuinfo_field("Hardware")
File "/usr/local/lib/python3.6/dist-packages/adafruit_platformdetect/init.py", line 49, in get_cpuinfo_field
with open("/proc/cpuinfo", "r") as infile:
File "/usr/lib/python3.6/codecs.py", line 309, in init
IncrementalDecoder.init(self, errors)
RecursionError: maximum recursion depth exceeded

What else am I missing in my container?

"i2cdetect -y -r 1" shows me that PCF9685 controler is visible inside container.
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: 40 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --

@tekktrik
Copy link
Member

This looks to be an issue with Blinka rather than the library, as it's struggling to import the board module. If you update to the latest version of Blinka, do you still see it? You may want to file this issue there if so: https://github.com/adafruit/Adafruit_Blinka

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants