Skip to content

Multiprocessing 2 sensors #72

@lixinghe1999

Description

@lixinghe1999

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions