Multichannel Gas Sensor with MKR1000

Grove is a modulated, ready-to-use tool set.
Much like Lego, it takes a building block approach to assembling electronics.

Moderators: lily.li, violet, jeremy882, crail.lyu969

Post Reply
User avatar
webmaster2
Pre-kindergarten
Pre-kindergarten
Posts: 18
Joined: Fri Mar 25, 2016 4:32 pm

Multichannel Gas Sensor with MKR1000

Post by webmaster2 » Wed Nov 07, 2018 11:37 pm

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?

bill.yu
Junior-7
Junior-7
Posts: 732
Joined: Mon Apr 02, 2018 11:05 am

Re: Multichannel Gas Sensor with MKR1000

Post by bill.yu » Thu Nov 08, 2018 6:20 pm

Hi there,

the issue shall be related with getVersion() function. please try below 2 actions. thanks.

1. add the while after Serial.begin

Serial.begin(115200); // start for output
while(!SerialUSB){

}

2. 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;
}

User avatar
webmaster2
Pre-kindergarten
Pre-kindergarten
Posts: 18
Joined: Fri Mar 25, 2016 4:32 pm

Re: Multichannel Gas Sensor with MKR1000

Post by webmaster2 » Thu Nov 08, 2018 11:04 pm

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).

Post Reply