Closed seth10 closed 7 years ago
A program to help test this issue might look something along the lines of the following:
import time
from mindsensors_i2c import mindsensors_i2c
from PiStorms import PiStorms
psm = PiStorms()
a = mindsensors_i2c(0x22 >> 1)
#psm.BAS1.pssensor.setType(0)
#psm.BAS2.pssensor.setType(0)
#psm.BBS1.pssensor.setType(0)
psm.BAS1.activateCustomSensorI2C()
psm.BAS2.activateCustomSensorI2C()
psm.BBS1.activateCustomSensorI2C()
psm.BBS2.activateCustomSensorI2C()
while not psm.isKeyPressed():
time.sleep(0.01)
print a.GetFirmwareVersion()
The explorer program made you use BAS1. I wanted to support all ports, so I changed it to
However, this causes issues. BAS1 and BAS2 work pretty reliably, but the bank B sensor ports are very spotty. Often the calls to GetFirmwareVersion, GetVendorName, or GetDeviceId would fail.
Having too many ports set to this mode can cause issues with load on the I2C bus. It is some electrical issue, a resistive issue, something with capacitance and the load on those lines. We currently do not know exactly why, but now this behavior is documented.