How to deal with two conflicted I2C addresses

Hi, I’m using raspberry pi and grove pi to code my project. Now I have a gas sensor (Grove - Multichannel Gas Sensor) and it has a default i2c address, 0x04, the same as the grove pi. These two same i2c addresses would compete with each other so only one of them could work. To get both of them to work, I have to make their addresses different. Does anyone have an idea how to do that? Thanks.

We have a way of uploading a differnet firmware on the GrovePi which makes it come up with a different GrovePi address here: Make sure that you install the updated python library or update the address in the

We also tried making a library for the sensor a while back: but it just didn;t work. Maybe you can also try it out and see if there was something we could have done differently.


Yes, I tried that script, but had no idea how to modify right now. So in the note of this file, it said that, this sensor is on port 0x04, so not compatible with grovepi unless you load an alternate firmware. So is this alternate firmware loaded by running the multi_grovepi_installer?

The code for that sensor is still under development. It might take some time to get it wore king. So to even reach a point where you can start tinkering with the code, you have to run that multi_grovepi_installer to move the grovepi to an address other than 0x04.


Hi karan
I run the multi_grovepi_installer and successfully change the i2c address. However, the firmware was burnt back to v1.2.2, and there’s a sensor that requires v1.2.4. When I updated the firmware to v1.2.4, the i2c address returned to 0x04 again. Do you have any idea to change the i2c address as well as to keep the firmware v1.2.4.

To move firmware 1.2.4 to address 0x05, you’ll have to make a small change in the firmware, compile it and burn it to the GrovePi. You can do this from the pi itself. Open the firmware folder in GrovePi and open the grove_pi_v1_2_4.ino in the Arduino IDE in VNC on the raspberry Pi. Next change the address in line 19 to 0x05 and select the board as Arduino Uno and compile it. Once the program is compiled, you can upload it to grovepi by using Upload using programmer option on the Arduino IDE.


A post was merged into an existing topic: GrovePi+ Multichannel Gas Sensor

Hi guys, i have the same problem using a grove multichannel gas sensor on my grovepi. Changing the I2C address to 0x03 fixes the problem and i can access it with Python using “import grovepi3”. But I want to access it from Java using the jgrove library. But this doesn’t seem to work as soon as I change the I2C from 0x04 to something else. I tried also to use the Buzzer plugged into D8 but it won’t make any noise. If I turn it on via Python everything works fine. Do you have any suggestions?

@rene.alabid: This sensor was pretty unstable the last time we tried using it with the GrovePi. Does it work well in your setup when you use it with Python. Have you tried running it for an hours or so and checking if it still returns good values.

Coming to compatibility with the other libraries, we only have the firmware/library combination for other address available for python. However, to make the normal libraries work on different address, all you need to change is the I2C address in the respective programming language. For jgrove, it would be here.

Do let us know if this helps. Also, have you tried using jgrove library. Any reviews on what worked well with it and what did not.

hi Karan, I’m trying to make the multichannel gas sensor work on GrovePi following your advice above.
I’m on Raspbian for Robots Stretch (2018.6.27), Kernel is 4.14.71-v7+.
I’ve switched my GrovePi’s i2c address to 0x03 (I have only one GrovePi attached to my RasPi).
I’ve tried to run the, but I ended with
‘raise UIError(ff1.errno)’
IOError: 121

So I’m trying to compile the v1.2.7 firmware to the grovepi, and tried to follow the steps you described, but can’t get it done. Could you please let me know detailed step by step breakdown on how to compile using ArduinoIDE from the RasPi?

I really appreciate your help in advance!