Airquality sensor on grove pi at facing::::Check whether I2C enabled and Grove Base Hat RPi or Grove Base Hat RPi Zero inserted

Hi team,
i have connected air quality sensor through raspberry pi on port 0.but i am facing error the sensor showing Check whether I2C enabled and Grove Base Hat RPi or Grove
Base Hat RPi Zero inserted…how could we resolve it please let me know the resolution

Same problem here. Can somebody help ?

same problem with me, did anyone got the solution ?

Same error message but with Light Sensor 1.2 sensor.

Hi guys, due to the epidemic, the chip used on this product has been modified from STM32 to MM32, so the I2C address has also changed - the address has been changed from 0x04 to 0x08.
Please check which chip you received before using this product, if you are using MM32, please change the I2C address 0x04 to 0x08 in the adc.py file.

Hello,

i have same issue but with old type of chip -> STM32. It means changing adress wont help me. It happens after few responses of sensors. Reboot wont solved my issue. Error dissappears only after turning off and turning on raspberry pi manually -> after unpluging from power??

I need to use raspberry pi with grove hat remotely.

1 Like

This is thread is copied from the following website. It works.
https://issueexplorer.com/issue/microsoft/IoT-For-Beginners/287

Here are the steps I took for my workaround:

  1. In the terminal session to the Pi within VS Code, make a backup of adc.py by typing:
    sudo cp /usr/local/lib/python3.7/dist-packages/grove/adc.py /usr/local/lib/python3.7/dist-packages/grove/adc.py.bak (because… safety)

  2. In the terminal session to the Pi within VS Code, change the permissions on adc.py so that you can edit the file from within VS Code by typing
    sudo chmod 666 /usr/local/lib/python3.7/dist-packages/grove/adc.py (This assumes you installed the python distribution patches in the same location as python3. Your mileage may vary depending on where you installed these Python packages).

  3. Go to the File > Open… menu to open up the Open File Or Folder dialog box.

  4. Enter in /usr/local/lib/python3.7/dist-packages/grove/adc.py, then press the OK button.

  5. In the adc.py file, go to approximately line 57, and change the 0x04 to 0x08 as shown below from:

def __init__(self, address = 0x04):to: def __init__(self, address = 0x08):

  1. Go to the File > Save menu to Save the adc.py file.

  2. In the terminal session to the Pi within VS Code, change the permissions back on adc.py by typing:
    sudo chmod 644 /usr/local/lib/python3.7/dist-packages/grove/adc.py.

Now it works!

2 Likes

Works! Thanks! Quick and easy :slight_smile:

Thanks kazim425!

There was a mention on pi’s grove hat manual page, that the chip and address had changed, but nothing in the grove.py’s documentation.

To confirm, you have the MM32… chip;

pi@raspberrypi:~ $ i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: 08 – – – – – – –

Above, note 08.

sudo find / -name adc.py
/usr/local/lib/python3.9/dist-packages/grove/adc.py
/home/pi/.local/lib/python3.9/site-packages/grove/adc.py
/home/pi/grove.py/grove/adc.py
pi@raspberrypi:~ $

I manually edited all adc.pys, why 3, don’t know. Changed all 0x04 to 0x08, there was also some 0x0004, changed the last digit to 8 as well, and now works!

1 Like

i did not sucess about use of grove -moisture sensor .
but by your advice i sucessed.
Thank you very much.

For those who have this problem with an STM32, they adapt the repo so it now works with MM32 by default.
So we now have to do the opposite of kazim425 comment: change address from 0x08 to 0x04