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
Baozhu
November 18, 2020, 12:29am
#2
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
the LED Strip is connected to the PWM
salman
November 18, 2020, 11:01am
#4
@Tackgnol Can you share program and the full error log?
@salman
The code is available here:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# The MIT License (MIT)
# Port to support Grove - WS2813 RGB LED Strip Waterproff - XXX LED/m
#
# Grove Base Hat for the Raspberry Pi, used to connect grove sensors.
# Copyright (C) 2018 Seeed Technology Co.,Ltd.
#
# NeoPixel library strandtest example
# Author: Tony DiCola ([email protected] )
#
# Direct port of the Arduino NeoPixel library strandtest example. Showcases
# various animations on a strip of NeoPixels.
'''
This is the code for
- `Grove - WS2813 RGB LED Strip Waterproof - 30 LED/m -1m <https://www.seeedstudio.com/Grove-WS2813-RGB-LED-Strip-Waterproof-30-LED-m-1m-p-3124.html>`_
- `Grove - WS2813 RGB LED Strip Waterproof - 60 LED/m - 1m <https://www.seeedstudio.com/Grove-WS2813-RGB-LED-Strip-Waterproof-60-LED-m-1m-p-3126.html>`_
- `Grove - WS2813 RGB LED Strip Waterproof - 144 LED/m - 1m <https://www.seeedstudio.com/Grove-WS2813-RGB-LED-Strip-Waterproof-144-LED-m-1m-p-3127.html>`_
This file has been truncated. show original
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?
salman
November 18, 2020, 11:38am
#6
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).
zaco
December 18, 2020, 8:55pm
#8
@salman i can’t get it working on RPi3B
could you PLS specify install/update all dependencies
TKS
zaco
December 18, 2020, 8:57pm
#9
@salman
could you PLS specify install/update all dependencies
TKS
salman
December 19, 2020, 1:45pm
#10
@zaco try to install the grove.py first by using these commands.
zaco
December 19, 2020, 3:03pm
#12
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
salman
December 28, 2020, 4:36am
#13
Installing the grove.py , by running the command you alredy did that.
zaco
December 28, 2020, 11:57am
#14
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.
salman
December 30, 2020, 4:54am
#15
Can you share the pin connection and the program you used!
zaco
December 30, 2020, 12:45pm
#16
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()
zaco
December 30, 2020, 12:57pm
#18
i have tested also with this scrpt:
grove_ws2813_rgb_led_strip
salman
December 31, 2020, 8:32am
#19
salman:
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
@zaco can you try these steps! and let me know the feedback.
zaco
December 31, 2020, 2:06pm
#20
i have do it but no leds switch on
is what i don’t understand
salman
December 31, 2020, 2:33pm
#21
Here 12 is the GPIO number and 60 is the number of led, you should change that.