I’ve two Multichannel Gas Sensor and no one talk with MKR1000.
First guess is oriented to the I2C voltage level of the MKR that’s 3.3V so I’ve tried with a Seeeduino 4.2: first a 5V and all was good, then I switched at 3.3V and tried again… the Gas Sensor still works! So… why works a 3.3V with Seeeduino and won’t work a 3.3V with MKR?
Hi there,
the issue shall be related with getVersion() function. please try below 2 actions. thanks.
- add the while after Serial.begin
Serial.begin(115200); // start for output
while(!SerialUSB){
}
- please modify the cpp file
void MutichannelGasSensor::begin(int address)
{
__version = 2; // version 1/2
r0_inited = false;
Wire.begin();
i2cAddress = address;
//__version = getVersion();
}
unsigned char MutichannelGasSensor::getVersion()
{
return 2;
}
Point 1: already present on my sketch.
Point 2: modified the cpp as your direction but with NO LUCK… now I pass the initialization of the sensor but it freeze when I try to read a measure (note that the sensor work also with WIO node).