hannescam / NeoSPI

A simplistic C++ SPI NeoPixel driver that works on any linux device with SPI
GNU General Public License v3.0
3 stars 1 forks source link

Raspberry Pi 5 Support #2

Closed GuyPerets106 closed 6 months ago

GuyPerets106 commented 6 months ago

Hi , I got here from your comment in https://github.com/jgarff/rpi_ws281x/issues/528 I tried to use https://github.com/fschrempf/py-neopixel-spidev to turn on my LED strip connected to my RPi 5 with no success , unfortunately. Then I came across this repo of yours, and it indeed turns on the LEDs :) So I have 2 questions:

  1. I would like to hear from you how you managed to get the py-neopixel-spidev working. I'm running their basic example on spidev0.0 and nothing turns on.
  2. In this repo of yours - after the LEDs turn on, how to turn them off? I did not find any command that does so in here.

Thanks!

hannescam commented 6 months ago

Hello, For me py-neopixel-spidev (cloned from github) works perfectly fine when I replace with np.NeoPixelSpiDev(2, 0, n=56, pixel_order=np.GRB) as pixels: with with np.NeoPixelSpiDev(0, 0, n=56, pixel_order=np.GRB) as pixels: You can clear the LEDs with my library by using strip.fillStripRGB(0,0,0); and to apply strip.show(); but if you want I can implement a clear function

GuyPerets106 commented 6 months ago

Hello, For me py-neopixel-spidev (cloned from github) works perfectly fine when I replace with np.NeoPixelSpiDev(2, 0, n=56, pixel_order=np.GRB) as pixels: with with np.NeoPixelSpiDev(0, 0, n=56, pixel_order=np.GRB) as pixels: You can clear the LEDs with my library by using strip.fillStripRGB(0,0,0); and to apply strip.show(); but if you want I can implement a clear function

Thanks for the reply! Can I ask to which pin you connected the data pin of the LED strip? image

hannescam commented 6 months ago

I connected it to GPIO 10 which is MOSI for spidev0.0 and 0.1

GuyPerets106 commented 6 months ago

Thank you! just figured it out