HELP Grove Base Hat with LED Socket not working!

Hi all,

For a school project I am building a device using a Raspberry Pi 4, Grove Base Hat and a LED socket.

My goal for now is to blink the LED light on and off.

This is what I’ve done so far.

  1. Connected the Grove Base Hat on to the Raspberry Pi 4.

  2. Started up the Raspberry Pi, opened up a terminal and ran sudo raspi-config. Inside the interface options I enabled the I2C then clicked on finish. And sudo reboot.

  3. I opened up a terminal and ran

curl -sL https://github.com/Seeed-Studio/grove.py/raw/master/install.sh | sudo bash -s -

Installation was done successfully.

  1. Turned off the Raspberry Pi. Connected 3 light sockets on D5, D22 and D24. Then turned the Raspberry Pi on.

  2. cd Desktop and Then nano led.py.
    I wrote a simple script.

from time import sleep
from grovepi import *

led = 5
pinMode(led, "OUTPUT")
sleep(1)

for i in range(2):
    digitalWrite(led, 1)
    print('ON')
    sleep(1)
    digitalWrite(led, 0)
    print('OFF')

print('next..')

led = 22
pinMode(led, "OUTPUT")
sleep(1)

for i in range(2):
    digitalWrite(led, 1)
    print('ON')
    sleep(1)
    digitalWrite(led, 0)
    print('OFF')

print('next..')

led = 24
pinMode(led, "OUTPUT")
sleep(1)

for i in range(2):
    digitalWrite(led, 1)
    print('ON')
    sleep(1)
    digitalWrite(led, 0)
    print('OFF')

print('next..')

led = 25
pinMode(led, "OUTPUT")
sleep(1)

for i in range(2):
    digitalWrite(led, 1)
    print('ON')
    sleep(1)
    digitalWrite(led, 0)
    print('OFF')

print(‘exiting...’)
  1. I ran this script with both sudo python3 led.py and just python3 led.py. The print messages are printed but nothing turns on. I tried changing the file ownership to root and ran it again but still doesn’t work.

I saw someone on the internet trying to run sudo i2cdetect -y 1. Maybe this is something we need for debugging this problem. I ran this command and got:

pi@raspberrypi:~/Desktop $ sudo i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- 04 -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --    

Can anyone please help me out? I think my Grove Base Hat is not detected at all. I keep changing the values of led to 5, 22 or 24, but not one led turns on… I will add some pictures!

hello

the Grove Base HAT is manufactured and supported by SEEED exclusively. We have no knowledge of it, unfortunately.