Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RaspberryPi 1 issues #362

Open
timcooper opened this issue Jul 26, 2022 · 0 comments
Open

RaspberryPi 1 issues #362

timcooper opened this issue Jul 26, 2022 · 0 comments

Comments

@timcooper
Copy link

Hello, thanks for the work on this project, got it running perfectly using an ESP8266 device - however I need to use it in a situation where no network will be available so I'm trying to get the Pi solution working. This is using an rpi version 1 model B (I know this is old, but I had one lying around and it should work right?).

I have a 5V 10A supplying power and ground to both with a 440 ohm resistor between GPIO18 and the LED strip data connection (essentially the same setup as I had working with a NodeMCU). I also have a USB mic plugged into the pi and the latest rpi os (lite).

First issue was the readme seems a little out of date, referring to a strandtest.py that doesn't seem to exist. I found that this test code had been moved to led.py. Running this had the issue of there not being a neopixel lib available, I got around this by adding it into the python dir (from https://github.com/richardghirst/rpi_ws281x/blob/master/python/neopixel.py).

Running led.py I get Starting LED strand test in the console but no action on the LEDs.

Running visualization.py I get the following warnings before the FPS counter, but again no action on the LEDs. Does this suggest my mic wouldn't work anyway? I'm assuming since the test fails it wouldn't make a difference but could be another issue down the line...

ALSA lib pcm_dmix.c:1075:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:1075:(snd_pcm_dmix_open) unable to open slave
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
FPS 30 / 60
FPS 17 / 60

config.py is setup as follows:

"""Settings for audio reactive LED strip"""
from __future__ import print_function
from __future__ import division
import os

#DEVICE = 'esp8266'
DEVICE = 'pi'
"""Device used to control LED strip. Must be 'pi',  'esp8266' or 'blinkstick'

'esp8266' means that you are using an ESP8266 module to control the LED strip
and commands will be sent to the ESP8266 over WiFi.

'pi' means that you are using a Raspberry Pi as a standalone unit to process
audio input and control the LED strip directly.

'blinkstick' means that a BlinkstickPro is connected to this PC which will be used
to control the leds connected to it.
"""

if DEVICE == 'esp8266':
    UDP_IP = '192.168.0.150'
    """IP address of the ESP8266. Must match IP in ws2812_controller.ino"""
    UDP_PORT = 7777
    """Port number used for socket communication between Python and ESP8266"""
    SOFTWARE_GAMMA_CORRECTION = False
    """Set to False because the firmware handles gamma correction + dither"""

if DEVICE == 'pi':
    LED_PIN = 18
    """GPIO pin connected to the LED strip pixels (must support PWM)"""
    LED_FREQ_HZ = 800000
    """LED signal frequency in Hz (usually 800kHz)"""
    LED_DMA = 5
    """DMA channel used for generating PWM signal (try 5)"""
    BRIGHTNESS = 255
    """Brightness of LED strip between 0 and 255"""
    LED_INVERT = False
    """Set True if using an inverting logic level converter"""
    SOFTWARE_GAMMA_CORRECTION = True
    """Set to True because Raspberry Pi doesn't use hardware dithering"""

if DEVICE == 'blinkstick':
    SOFTWARE_GAMMA_CORRECTION = True
    """Set to True because blinkstick doesn't use hardware dithering"""

USE_GUI = False
"""Whether or not to display a PyQtGraph GUI plot of visualization"""

DISPLAY_FPS = True
"""Whether to display the FPS when running (can reduce performance)"""

N_PIXELS = 60
--snip--

I don't currently have a logic level shifter, could that be the problem? I would expect it to still "work" without one just a little jankily. I can try with the shifter in a couple days, but suspect it won't make too much difference.

@timcooper timcooper changed the title RapberryPi 1 issues RaspberryPi 1 issues Jul 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant