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

Multiprocessing 2 sensors #72

Open
lixinghe1999 opened this issue Sep 28, 2021 · 0 comments
Open

Multiprocessing 2 sensors #72

lixinghe1999 opened this issue Sep 28, 2021 · 0 comments

Comments

@lixinghe1999
Copy link

I use two identical sensors with bus 1 and bus 6, all detected by i2cdetect and can run perfectly individually.
However, when I try to run them at the same time by multiprocessing, I get the below question. And such error can occur on both sensor.

I have no idea it is the problem of multiprocessing or quick2wire i2c. PLEASE help me if possible.

File "/usr/local/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/usr/local/lib/python3.6/multiprocessing/process.py", line 93, in run
self._target(*self._args, **self._kwargs)
File "GY-85_Raspberry-Pi/datarecord.py", line 48, in acc_save
if adxl345.getInterruptStatus():
File "/home/pi/audioproject/GY-85_Raspberry-Pi/i2clibraries/i2c_adxl345.py", line 115, in getInterruptStatus
self.InterruptSource)
File "/home/pi/audioproject/GY-85_Raspberry-Pi/i2clibraries/i2c_adxl345.py", line 283, in getOptions
options_bin = self.bus.read_byte(register)
File "/home/pi/audioproject/GY-85_Raspberry-Pi/i2clibraries/i2c.py", line 19, in read_byte
reading(self.addr, 1))[0][0]
File "/home/pi/audioproject/quick2wire-python-api/quick2wire/i2c.py", line 78, in transaction
ioctl(self.fd, I2C_RDWR, ioctl_arg)
TimeoutError: [Errno 110] Connection timed out

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

1 participant