Problems running modules on a Grove Raspberry Pi Hat

I have a project in mind to run a Grove Mini Fan module with a Grove Mini PIR Sensor through a Grove Raspberry Pi Hat on a Raspberry Pi 3B

I have connected the base hat to the Raspberry Pi and completed the installation of grove.py. I enabled the I2C on my Raspberry Pi connected the Grove Mini PIR Sensor to the D5 port and tried to run the demo program grove_mini_pir_motion_sensor.

I get the following message:

“Check whether I2C enabled and Grove Base Hat RPi or Grove Base Hat RPi Zero inserted”

I have tried rebooting the raspberry pi, cold plugging the modules, trying different ports. However, the result is always the same. I have thought of updating the firmware of the hat but I couldn’t find any documentation about that.

Could someone help me with this issue?

Thanks in advance,
Cheers,

3 Likes

Same problem here… help needed.

1 Like

Me too. Does someone know how to reinstall the firmware?

1 Like

Same problem here :sweat_smile:. Did you ever figure out a solution @notasingleduck

I thought maybe it was due to the 8GB version but… seems not.

Some progress made with the use of python virtual environments:

pi@iotpi:~/venvs/test $ grove_led 5
Check whether I2C enabled and   Grove Base Hat RPi  or  Grove Base Hat RPi Zero  inserted
pi@iotpi:~/venvs/test $ source venv/bin/activate
(venv) pi@iotpi:~/venvs/test $ grove_led 5
# proceeds to run & lights work

Running from a file still fails. Will continue investigation :).

Did you use the one-click or the step-by-step installation? Does your virtual environment use a different python version then the default one?

I am also seeing the same error, can you help us here with the actual step to be followed

I am getting the same msg - “Check whether I2C enabled and Grove Base Hat RPi or Grove Base Hat RPi Zero inserted”. RPi4 with Gove Light Sensor in A0. I2C is enabled, disabling it produces a bunch of different errors. MM32F chip on the hat, hat package date 05/06/21. I can use port D5 with another sensor no problem.

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.

Hi,

Changing the adc.py didn’t work for me.

I changed the file: “/home/pi/grove.pi/grove/adc.py” .

I changed the line " def init(self, address = 0x08):"

Still getting … Check whether I2C enabled …

I am having the same issue.
Have you found a solution?

Getting closer.

I can run “python adc.py” and it displays the values from my grove light sensor so certainly changing the address to 0x08 in the adc.py file works. I must have some other kind of problem since running the “grove_light_sensor_v1_2.py” on my RPi4 spits out an i2c error. pythoon, libraries, includes and all that is new to me.

I found a workaround. If I run my Python code, in VS Code, from the Run drop down menu it works. It just doesn’t work from the Terminal with the command “pyhton app.py”. For a beginner like me this is solution and I can move forward.

Why? running your code from the Run drop down puts a bunch of stuff on cmd line, this must be what causes it to find the right file with the correct address for the MM32 adc.