I am using the Raspberry Pi 3 B model with Grove Pi + (1.2.2) firmware and Raspbian for Robots Image. I plug in a multi-channel gas sensor in the I2C-1 port and I try to execute the code available in Dexter's Github , I get the following problems:
> Traceback (most recent call last): File "/home/pi/Desktop/GrovePi/Software/Python/grove_i2c_multichannel_gas_sensor/multichannel_gas_sensor.py", > line 85, in m= MutichannelGasSensor() File > "/home/pi/Desktop/GrovePi/Software/Python/grove_i2c_multichannel_gas_sensor/multichannel_gas_sensor.py", > line 39, in init if self.readR0() >= 0: File > "/home/pi/Desktop/GrovePi/Software/Python/grove_i2c_multichannel_gas_sensor/multichannel_gas_sensor.py", > line 45, in readR0 rtnData = self.readData(0x11) File > "/home/pi/Desktop/GrovePi/Software/Python/grove_i2c_multichannel_gas_sensor/multichannel_gas_sensor.py", > line 70, in readData buffer=bus.read_i2c_block_data(self.address, cmd, > 4)IOError: [Errno 110] Connection timed out
When I launched the old GrovePi + firmware, this error did not appear, but it did not work, nothing is displayed on the screen.
Checking the code line by line, I understand that on line 71 there is a print (data) after the buffer = bus.read_i2c_block_data (self.address, cmd, 4), but the variable "data" is not defined in the code, Something is strange in this code .
Can someone help me with this grove sensor? Can someone tell me?
Aitul source share