Git Product home page Git Product logo

Comments (11)

tdicola avatar tdicola commented on May 20, 2024

Check out the fork mentioned in the thread here for a version that some folks have luck with on a Pi 2: #25 The Pi 2 has some differences with the PWM & DMA behavior so the current library isn't compatible right now. It sounds like there are some non-trivial changes to port over support for the pi 2 to the original library here so for now your best bet is to check out that fork.

from rpi_ws281x.

wannabeCitizen avatar wannabeCitizen commented on May 20, 2024

Thanks for the direction. Looked into it and found another group that makes Unicornhats has fully integrated new PWM/DMA implementations compatible with the Rasp Pi2.

https://github.com/pimoroni/unicorn-hat

Looks like this person started the process: https://github.com/richardghirst/rpi_ws281x - I had volatility with the fork I took from there, but the unicorn-hat code worked like a charm with the Pi2.

from rpi_ws281x.

piers7 avatar piers7 commented on May 20, 2024

The changes in @richardghirst's branch appear to merge into this repo just fine, and worked for me (at the native library level anyway - didn't test the Python wrapper).

from rpi_ws281x.

huckw avatar huckw commented on May 20, 2024

Python wrapper almost works for me. Until I try to delete the object then I get a "munmap error -1". Anyone have any ideas of what I'm doing wrong....

strip=Adafruit_NeoPixel(LED_COUNT, LED_PIN, LED_FREQ_HZ, LED_DMA, LED_INVERT)
strip.begin()
del strip # this causes the munmap error, so will setting strip=None

from rpi_ws281x.

tdicola avatar tdicola commented on May 20, 2024

Huh that's odd, on delete the python wrapper is calling the ws2811_fini function from the C code to clean up and shutdown all the PWM so I don't think it's anything specific to the python wrapper. To check though if you run the C example code and quit with control C so it calls ws2811_fini too, does that also have a munmap -1 error?

from rpi_ws281x.

usefulthink avatar usefulthink commented on May 20, 2024

I found this commit somewhere in the network-graph that presumably addresses an issue with munmap. I haven't looked at it in depth but maybe that helps here: euang@73997a5

from rpi_ws281x.

huckw avatar huckw commented on May 20, 2024

I ran the example C code getting a vibrant display of lights then ctrl-C to quit. I did not get a munmap error but neither did the LEDs turn off.

pi@magpi ~/rpi_ws281x $ sudo ./test
^Cpi@magpi ~/rpi_ws281x $

Running the python strandtest.py example worked fine too and the ctrl-C also leaves the lights on but I do see the munmap error.

pi@magpi ~/rpi_ws281x/python/examples $ sudo python strandtest.py
Press Ctrl-C to quit.
^CTraceback (most recent call last):
  File "strandtest.py", line 94, in <module>
    theaterChase(strip, Color(  0,   0, 127))  # Blue theater chase
  File "strandtest.py", line 35, in theaterChase
    time.sleep(wait_ms/1000.0)
KeyboardInterrupt
munmap error -1

from rpi_ws281x.

huckw avatar huckw commented on May 20, 2024

Thanks usefulthink!! I did a git clone of euang's repo and BINGO!!! It works!

from rpi_ws281x.

KuenzelIT avatar KuenzelIT commented on May 20, 2024

Thanks for the hint!

Only problem is that the LEDs still stay lit. Is that normal?

from rpi_ws281x.

huckw avatar huckw commented on May 20, 2024

Nope....LEDs turn off for me. Every once in awhile I'll have an issue
where LEDs won't turn off but power cycling usually take care of it.

On Sat, Sep 5, 2015 at 7:42 AM, kuenzelIT [email protected] wrote:

Thanks for the hint!

Only problem is that the LEDs still stay lit. Is that normal?


Reply to this email directly or view it on GitHub
#32 (comment).

from rpi_ws281x.

jgarff avatar jgarff commented on May 20, 2024

The C level cleanup code doesn't turn off the leds. This allows the user to write a program to set the leds and terminate in case they need a static display. We should probably add a callback to allow the user to do something differently.

As for supporting the Pi2, I just created a rpi2 branch which supports newer kernels and the Raspberry Pi 2. This is a testing branch, so please give it a shot and let me know if you run into problems. Thanks

from rpi_ws281x.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.