Pi Zero Issues with WS2813

Hi, I have:
Grove-WS2813-RGB-LED-Strip-Waterproof-60-LED-m-1m
Raspberry PI Zero W (1.1)
Grove-Base-Hat-for-Raspberry-Pi-Zero

I am trying to run the demo app for the LED strip but I get an error:
sudo grove_ws2813_rgb_led_strip
Hat Name = ‘Grove Base Hat RPi Zero’
Usage: /usr/local/bin/grove_ws2813_rgb_led_strip [led-count]
could be one of below values
in the pin column for PWM function
And connect the device to corresponding slot
“==============”
pin | slot
“==============”
12 | PWM

The connector is pre-soldered to the Pi so it should not be a problem with the soldering images below:

The HAT itself seems to be working:

Is there something more I need to enable in the PiConfig?

EDIT:
I have added dtoverlay=pwm-2chan,pin=12,func=4,pin2=13,func2=4 to config.txt
and /usr/local/bin/librpip-util/librpip-pwm-init to /etc/rc.local
It results in all the LEDs lighting up, but the grove_ws2813_rgb_led_strip still returns the same error :frowning:

It’s not an i2C interface. How do you connect the front side?

Hi,
the I2C is the only one I know how to check on the RPi :wink:
the LED Strip is connected to the PWM

@Tackgnol Can you share program and the full error log?

@salman
The code is available here:

For the full error log hmmm… What I pasted is all I see on the console, is there a place where I can access more?

Did you install the grove.py libraries on raspberry pi? if not

First install/update all dependencies and latest grove.py
curl -sL https://github.com/Seeed-Studio/grove.py/raw/master/install.sh | sudo bash -s -

then in the command, you need to pass an argument to mention the pin and led number count.

you need to run like this: sudo grove_ws2813_rgb_led_strip.py 12 60

12 is the GPIO number and 60 is the number of led

@salman
You are amazing, it never occurred to me that it would require a param but it makes so much sense
(also shame on me for not reading the docs before posting).

@salman i can’t get it working on RPi3B
could you PLS specify install/update all dependencies
TKS

@salman
could you PLS specify install/update all dependencies
TKS

@zaco try to install the grove.py first by using these commands.

Thank you for your answear .
I have do that :curl -sL https://github.com/Seeed-Studio/grove.py/raw/master/install.sh | sudo bash -s -

but not working
i’m using RPi3b and buster version

Could you specify please what do you mean on:
install/update all dependencies
Thanks

Installing the grove.py , by running the command you alredy did that.

i’ve make the install .Is working for all slots except for PWM with Led strip.
i don’t get any error message but led doesn’t switch on.

Can you share the pin connection and the program you used!

this is a script i use:

from rpi_ws281x import PixelStrip
from time import time, sleep, localtime, strftime
from grove.gpio import GPIO
from RPi import GPIO as io

def light_led(led, pix, r, g, b):
for pixel in range(pix):
led.setPixelColorRGB(pixel, r, g, b)

print("led mode {} {} {}".format(str(r),str(g),str(b)))
led.show()

led20 = PixelStrip(16, 12) # Grove RGB led connected to grove PWM
led20.begin()

light_led(led20, 16, 55, 0, 0)
light_led(led20, 16, 55, 0,0)
sleep(5)
light_led(led20, 16, 0, 55, 0)
sleep(5)
led20._cleanup()

i use this hat

i have tested also with this scrpt:
grove_ws2813_rgb_led_strip

@zaco can you try these steps! and let me know the feedback.

i have do it but no leds switch on
is what i don’t understand

Here 12 is the GPIO number and 60 is the number of led, you should change that.