GithubHelp home page GithubHelp logo

jgarff / rpi_ws281x Goto Github PK

View Code? Open in Web Editor NEW
1.7K 1.7K 614.0 429 KB

Userspace Raspberry Pi PWM library for WS281X LEDs

License: BSD 2-Clause "Simplified" License

Python 8.37% C 87.74% Shell 2.25% CMake 1.64%

rpi_ws281x's People

Contributors

arcturis avatar baszapf avatar bromor avatar darinkes avatar dmjpixel avatar ensonic avatar flokli avatar gadgetoid avatar jgarff avatar louismt avatar martchus avatar mcaralp avatar mironiasty avatar myoung008 avatar navrocky avatar penfold42 avatar penguintutor avatar pietrodn avatar ppelleti avatar sgilissen avatar singhkpratham avatar squawkstudio avatar sschroe avatar supcik avatar swarren avatar tdicola avatar thetechromancer avatar thomas1610 avatar timonsku avatar twp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rpi_ws281x's Issues

PWM1 error

Hi jgarff,
on a pi B+ I've tried to change the PIn from PWM0 to PWM1 but get this error for:

LED_PIN = 19 or 13

~/rpi_ws281x/python/examples $ sudo python strandtest.py
Traceback (most recent call last):
File "strandtest.py", line 82, in
strip.begin()
File "/usr/local/lib/python2.7/dist-packages/rpi_ws281x-1.0.0-py2.7-linux-armv6l.egg/neopixel.py", line 101, in begin
raise RuntimeError('ws2811_init failed with code {0}'.format(resp))
RuntimeError: ws2811_init failed with code -1

if I switch PIN on PWM0: LED_PIN = 18 or 12, everything run fine.
Thanks in advance, BR

How to determine free DMA channels ?

It seems that differnt kernels have different ways to report in use DMA channels.

The kernel is also told in its boot parameters which DMA channel the GPU wants to use.

Does anyone know a complete reliable way to determine this ? Googling around doesn't seem to provide a nice concise approach here.

Thanks !

Which other pwm GPIO pin can I use?

I'm using the RPI B+, and I try to make neopixel run on an other GPIO than the 18, the 12 run well but I need 2 more GPIO.

Do u have any expériences with B+ and neopixel?

Gamma correction

Would you consider adding gamma correction to this library?

I'm new to this sort of thing, and it took me a while to find the source of my "colours look wrong" issue.

Only one LED is lit and it does not response properly.

I am using these LEDs: http://www.ebay.co.uk/itm/WS2811-WS2812-5050-RGB-LED-strip-Light-Waterproof-Individually-Addressable-DC5V-/111164910188

I know they work with my Arduino using the FastLED Library.

I am using a SN74HCT08N And chip for my level shifter.

When running sudo python strandtest.py (or any other application using this library) I get one flashing LED and nothing else.

Video of LED: https://drive.google.com/file/d/0B4ZWPNhO0xpMR3RSUjVFRFVjNlk/view?usp=sharing

Doesnt work ?

root@raspberrypi:~/rpi_ws281x-master# ./test
Can't open device file
: Permission denied

Servo Hat channel access

I am just wondering if this library could access a servo hat's channels.
For example, the Adafruit 16-channel PWM/Servo hat (https://www.adafruit.com/product/2327)
I was thinking that since the hat provides 16 channels for PWM output, how do I get the library to access those channels to control my digital LED Light strip?

Hangs on setup_pwm

When I run ./test, it hangs at line 330 of ws2811.c - waiting for the busy signal of the PWM clock to clear after enabling the clock (at least I assume this is what is going on). I cannot find anything in the BCM2835 Peripherals about the clock for the PWM controller. I was hoping someone could point me in the direction of the documentation for this, or give me some things to try.

Max nNumber of LEDs supported?

Hi Jeremy,

your library provides to me the long awaited link between RPi and ws281x-LEDs. Great!
However, would you expect RPi to be capable of supporting up to 110 LEDs (at which update-frequency)?

Regards,
Bernd

Main.c hooks the wrong signal

Sorry, not set up to do pull requests.

main.c:
instead of sigaction(SIGKILL, &sa, NULL);
should be sigaction(SIGINT, &sa, NULL);

There's no difference in behaviour just doing the fini, but I added code to turn all LEDs off, and that only works with this change. SIGINT is " Interrupt from keyboard", ie ctrl-c. SIGKILL is "Kill signal" and is the backstop when all else fails; "The signals SIGKILL and SIGSTOP cannot be caught, blocked, or ignored." See man 7 signal.

Random colors appear on the strip

Hey, sorry to bother you but I just ran the python test and wrote a few functions of my own to test the library and I'm having some problems (I have a 60 leds/m neopixel strip).

When I stop the program the first led keeps blinking/displaying random colors.
Also if I try and set the whole strip to red with the following code:

while True:
    for i in range(strip.numPixels()):
        strip.setPixelColor(i, Color(127,0,0))
    strip.show()

I get a random rainbow flashing through the strip.

If I try and set the strip to White, it stays white while flashing random colors between loop iterations but since they are so fast it's mostly white looking.

LED_COUNT is set to 60. Should I try and mess with any other parameters?

Any help would be appreciated.

any thoughts? on not working on RPi2?

Hi ya

I'm gonna spend some time trying to get your code up and running on the RPi2
so far the binaries are not working for sure.

I will do the build and see what comes.

Anythoughts? Pointers? Tips?

thx in advance
G

User Selectable RGB order flipped on render build

Came across this testing RPI_WS281X/GPIO connection on Pi2. A RGB pixel flood I built, and works as RGB on other controllers, was displaying as GBR via the FPP test page.

The proposed pull request #62 changes the render order of build to match the order of the bit shift routine. The bit shift routine "forces" an arrangement to a RGB order based
on color order selected by user but the render build actually loads it in GRB
order. This change will render as the bits were populated based on user selection.

Tested on a known RGB built 2811 flood on Pi2 with master-1 FPP code.

Thanks for your work on this library.

C++ neopixel API

Hi,

I started creating a C++ API for the Neopixel functions (similar to how you provided the Python version of the Neopixel API in /python).

Has this already been done ?

-J
PS: I couldn't figure how to flag this message as a non-issue.

Maximum number of LEDs 2

Hi jgraff,
thanks for your work, I'm looking to a way to drive more than 5000 Led in a matrix, the software limit on a raspberry B appear to be 3200, after this I get : "addr_to_bus() read() failed".
The DMA of the pi is 4K, how this is related to the maximum number of leds?
Is there a way to increase this number?
I've looked at your code but doesn't understand what you mean for "channel", if you can use 2 PIN for PWM, you could run two python programs which point to one each other?
Thanks in advance, BR.

Not cleaning up properly with only 1 led.

I am running 1 led based off of the main.c program provided.
When the program terminates, after calling ws2811_fini(&ledstring), the led is still lit. Furthermore, it appears that the dma must still be active, since the led stays lit if i simply do a reboot without a full power off.

Am I doing it wrong, or is this a bug. If so, i'd be glad to try and fix it.

Great work by the way.

Proposed fix for memory usage

From

typedef uint32_t ws2811_led_t;

to

typedef struct
{
    uint32_t value : 24;
} ws2811_led_t;

Along with changes to code, where bitshift must be done over .value and definition must use curly brackets, eg.

int dotspos[] = { 0, 1, 2, 3, 4, 5, 6, 7 };
ws2811_led_t dotcolors[] =
{
    {0x200000},  // red
    {0x201000},  // orange
    {0x202000},  // yellow
    {0x002000},  // green
    {0x002020},  // lightblue
    {0x000020},  // blue
    {0x100010},  // purple
    {0x200010},  // pink
};

and

int ws2811_render(ws2811_t *ws2811)
{
    volatile uint8_t *pwm_raw = ws2811->device->pwm_raw;
    int bitpos = 31, wordpos = 0;
    int i, j, k, l;

    for (i = 0; i < ws2811->count; i++)          // Led
    {
        uint8_t color[] =
        {
            (ws2811->leds[i].value >> 8) & 0xff,       // green
            (ws2811->leds[i].value >> 16) & 0xff,      // red
            (ws2811->leds[i].value >> 0) & 0xff,       // blue
        };
// etc...

Can I use this with 12v leds?

I'm thinking the answer might be 'no' but I'm struggling to find any concrete information about this.
I have read that the signal voltage needs to be 70% of that powering the led's. Is that applicable for pwm voltage also?
I am a bit confused as to whether 12v ws2812 are actually driven at 12v or if the voltage is stepped down to 5v.
I'm thinking of trying it and seeing what happens but I thought I'd ask here because I don't like fried pi!

Multiple PWM channels

Hello I have been using your library fairly successfully with 1 led ring. I have a second ring on RPi B+ pin 12, which should also be a PWM pin. When I run the code with PWM_PIN = 12, it still changes my ring on pin 18. Any ideas why it would do this?

Python hangs when trying to start communication channel on Raspberry Pi 2

There seems to be something going wrong when swig runs the initialization for the ws281x channel. You can trace it back to there from strip.begin() in the example file - samplethread.py

Any ideas on where to look for fixing this? Am working on a project that uses Pi to communicate with WS2812s, but will probably just old Pi instead of Pi 2 due to this error. However, I'd be happy to put some work into fixing it up for Pi 2 if I can get any guidance on where to start. As a beginner with swig, it's hard to say what the culprit may be in the C or whether it's the SWIG interface itself.

[SOLVED] RGBW support

Hi,

I'm trying to control a RGBW NeoPixel strip (https://www.adafruit.com/products/2847) with a Raspberry Pi 2 (model B, 1Gb RAM).

I've been using the rpi2 branch and it is able to control the LEDs. But, as you would probably expect, the behavior of the LEDs is not correct. This clearly has something to do with how the R, G, B, and W information is encoded. For instance, if I try to turn on an odd numbered LED (say LED 5 in my strip), the blue light does not turn on and the white light is turned on on LED #4; if I try to turn on an even numbered LED, the blue & white LED turn on simultaneously.

I've tried mucking around in neopixel.py and ws2811.c but I cannot seem to sort it out (I'm not terribly proficient at byte-code type stuff). From ws2811.c, it would seem that the appropriate changes would be around lines 58-62 where the LED_BIT_COUNT and PWM_BYTE_COUNT variables are set as well as around lines 636 where the 'r/g/bshift' variables are set. I tried just specifying them as +24, +16, +8, +0, but that didn't seem to do much.

Can anyone point me in the right direction about how to get RGBW control using this library or incorporate a fix?

Also, here is the data sheet for the lights which describes the LEDs (https://www.adafruit.com/images/product-files/2757/p2757_SK6812RGBW_REV01.pdf)

Thanks!
Alan

Incompatible with pyaudio?

So I've encountered a strange issue with my lights while using the pyaudio module. Using this module in any script on the pi seems to cause the lights to behave erratically. Running a script with just:

import pyaudio
p = pyaudio.PyAudio()

and then running the strandtest.py will cause the lights to blink rapidly on and off in a series of random colours. This persists until the pi is rebooted.

Ubuntu 14.04 - Python 2.7.6 Error with python setup install :(

arm-linux-gnueabihf-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c rpi_ws281x_wrap.c -o build/temp.linux-armv7l-2.7/rpi_ws281x_wrap.o
arm-linux-gnueabihf-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security build/temp.linux-armv7l-2.7/rpi_ws281x_wrap.o -L../. -lws2811 -o build/lib.linux-armv7l-2.7/_rpi_ws281x.so
/usr/bin/ld: .././libws2811.a(ws2811.o): relocation R_ARM_THM_MOVW_ABS_NC against `a local symbol' can not be used when making a shared object; recompile with -fPIC
.././libws2811.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1

Python 2.7.6 (default, Mar 22 2014, 23:30:12)

Any ideas or solutions ?

Not able to light any LEDs on Pi3

Hello. First of all, thanks for your work to provide this! I tried to test this out on a Rapberry Pi 3. This is the configuration I use: I connected the strips directly to 5V and to the GPIO pin 18.

# LED strip configuration:
LED_COUNT      = 150     # Number of LED pixels.
LED_PIN        = 18      # GPIO pin connected to the pixels (must support PWM!).
LED_FREQ_HZ    = 800000  # LED signal frequency in hertz (usually 800khz)
LED_DMA        = 5       # DMA channel to use for generating signal (try 5)
LED_BRIGHTNESS = 255     # Set to 0 for darkest and 255 for brightest
LED_INVERT     = False   # True to invert the signal (when using NPN transistor level shift)

When I run strandtest.py, it is running, but nothing is happening to the LEDs. Can anyone confirm, that this should work on the Pi3 as well?

Thank you so much for your help in advance!

Not working correctly on Raspberry Pi 2

I'm trying to get my WS2812B 5050 LED Strip (5m, 150 LEDs) to work on my Raspberry Pi 2. I've tried several different libraries and while some don't start at all, others (including this one) make about half of my LED Strip flicker in random colors and without any order when checking it with the strandtest.py.

After I read some issues and pull requests, it seems like I can't find a solution for my problem. I also tried messing with the frequency and used Pin 12 instead of Pin 18 without any improvement.

If it helps, here is my install routine:

pi@pi:~ $ git clone https://github.com/jgarff/rpi_ws281x.git
Cloning into 'rpi_ws281x'...
remote: Counting objects: 216, done.
remote: Total 216 (delta 0), reused 0 (delta 0), pack-reused 216
Receiving objects: 100% (216/216), 141.10 KiB | 0 bytes/s, done.
Resolving deltas: 100% (125/125), done.
Checking connectivity... done.
pi@pi:~ $ cd rpi_ws281x/
pi@pi:~/rpi_ws281x $ sudo scons
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
CC      main.o
CC      mailbox.o
CC      ws2811.o
CC      pwm.o
CC      dma.o
CC      rpihw.o
AR      libws2811.a
RANLIB  libws2811.a
LINK    test
scons: done building targets.
pi@pi:~/rpi_ws281x $ cd python/
pi@pi:~/rpi_ws281x/python $ sudo python setup.py install
running install
running bdist_egg
running egg_info
creating rpi_ws281x.egg-info
writing rpi_ws281x.egg-info/PKG-INFO
writing top-level names to rpi_ws281x.egg-info/top_level.txt
writing dependency_links to rpi_ws281x.egg-info/dependency_links.txt
writing manifest file 'rpi_ws281x.egg-info/SOURCES.txt'
reading manifest file 'rpi_ws281x.egg-info/SOURCES.txt'
writing manifest file 'rpi_ws281x.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-armv7l/egg
running install_lib
running build_py
creating build
creating build/lib.linux-armv7l-2.7
copying neopixel.py -> build/lib.linux-armv7l-2.7
running build_ext
building '_rpi_ws281x' extension
swigging rpi_ws281x.i to rpi_ws281x_wrap.c
swig -python -o rpi_ws281x_wrap.c rpi_ws281x.i
creating build/temp.linux-armv7l-2.7
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c rpi_ws281x_wrap.c -o build/temp.linux-armv7l-2.7/rpi_ws281x_wrap.o
arm-linux-gnueabihf-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wl,-z,relro -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-armv7l-2.7/rpi_ws281x_wrap.o -L../. -lws2811 -o build/lib.linux-armv7l-2.7/_rpi_ws281x.so
creating build/bdist.linux-armv7l
creating build/bdist.linux-armv7l/egg
copying build/lib.linux-armv7l-2.7/_rpi_ws281x.so -> build/bdist.linux-armv7l/egg
copying build/lib.linux-armv7l-2.7/neopixel.py -> build/bdist.linux-armv7l/egg
byte-compiling build/bdist.linux-armv7l/egg/neopixel.py to neopixel.pyc
creating stub loader for _rpi_ws281x.so
byte-compiling build/bdist.linux-armv7l/egg/_rpi_ws281x.py to _rpi_ws281x.pyc
creating build/bdist.linux-armv7l/egg/EGG-INFO
copying rpi_ws281x.egg-info/PKG-INFO -> build/bdist.linux-armv7l/egg/EGG-INFO
copying rpi_ws281x.egg-info/SOURCES.txt -> build/bdist.linux-armv7l/egg/EGG-INFO
copying rpi_ws281x.egg-info/dependency_links.txt -> build/bdist.linux-armv7l/egg/EGG-INFO
copying rpi_ws281x.egg-info/top_level.txt -> build/bdist.linux-armv7l/egg/EGG-INFO
writing build/bdist.linux-armv7l/egg/EGG-INFO/native_libs.txt
zip_safe flag not set; analyzing archive contents...
creating dist
creating 'dist/rpi_ws281x-1.0.0-py2.7-linux-armv7l.egg' and adding 'build/bdist.linux-armv7l/egg' to it
removing 'build/bdist.linux-armv7l/egg' (and everything under it)
Processing rpi_ws281x-1.0.0-py2.7-linux-armv7l.egg
Removing /usr/local/lib/python2.7/dist-packages/rpi_ws281x-1.0.0-py2.7-linux-armv7l.egg
Copying rpi_ws281x-1.0.0-py2.7-linux-armv7l.egg to /usr/local/lib/python2.7/dist-packages
rpi-ws281x 1.0.0 is already the active version in easy-install.pth

Installed /usr/local/lib/python2.7/dist-packages/rpi_ws281x-1.0.0-py2.7-linux-armv7l.egg
Processing dependencies for rpi-ws281x==1.0.0
Finished processing dependencies for rpi-ws281x==1.0.0
pi@pi:~/rpi_ws281x/python $ sudo python examples/strandtest.py 
Press Ctrl-C to quit.

Compatibility issue with WS2812 (pre-B)

I've used your library quite happily to drive a 4m LED strip based on WS2812B (Adafruit NeoPixels), but when I attempt to drive either a WS2812 (non-B strip) or WS2811 (chain) I get strange color artefacts, and 'jumps' in the color.

The same strips work fine when run of a Trinket, so it's not the strips. I suspect the signal you are generating might be slightly off, and the non-B versions of the chip are more susceptible (as I understand it the B chip also cleans up the signal that gets sent to each downstream chip, so it's probably more tolerant).

Just highlighting this for others to be aware of.

Support WS2811 protocol for the RGB led

Hi Jeremy,
Do you have and plants to support the older WS2811 protocol for the RGB defused leds. The only difference is the they word at 400KHz (already supported) and that the timings are different (ie T0H is 0.5us and not 0.4us). Can you point out the line where you define the timing for the T0H, T1H, T0L and T1L .

Thank you,

Yiannis

Onion Omega

Trying to get this working on the Onion (using python-light) and I am getting a lot of python errors when running setup.py

Traceback (most recent call last):
File "setup.py", line 3, in
from ez_setup import use_setuptools
File "/root/rpi_ws281x-master/python/ez_setup.py", line 19, in
import tempfile
File "/usr/lib/python2.7/tempfile.py", line 35, in
from random import Random as _Random
File "/usr/lib/python2.7/random.py", line 49, in
import hashlib as _hashlib
File "/usr/lib/python2.7/hashlib.py", line 149, in
import logging
ImportError: No module named logging

Any ideas what is happening?
Could it be because i am using python-light?
Full python is too big to install along with the apps I already have.

I also tried using SCons but the setup file for that won't work either :)

P.S Great library!

no level shifter is needed

if you have a look at the datasheet you will see that it just needs 0.7V as high level. I can directly drive the leds at 3.3V logic level.

On GRB and RGB

In the guide here (https://learn.adafruit.com/neopixels-on-raspberry-pi/wiring) it states:

Also be aware the rpi_ws281x library only supports GRB NeoPixels/WS281x LEDs right now.  Support for RGB and BGR will likely come in the future (but pull requests are happily accepted!).

and I was looking to buy https://www.adafruit.com/products/1586, but according to the guide, This wouldnt work because the LED ring is RGB? does this library now support RGB? (the guide hasn't been updated lately) (I personally never heard of GRB or BGR before, but I thought to ask before buying anything)

"Can't open device file /tmp/mailbox-XXXX: No such device or address" - Kernel 4.1.6

It looks like Kernel 4.1.6 has introduced some changes which have broken the use of Mailbox functionality in this library. I've updated to the latest Raspbian, Linux 4.1.6-v7+ #810 and am no longer able to get it working.

The error seems to be with opening the device after creation, despite creation seemingly happening fine and not throwing any errors:

Can't open device file /tmp/mailbox-XXXX: No such device or address

I've seen at least one other report of this problem in respect to our Unicorn HAT library, and another seemingly related problem on this thread here: https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=117547

I've tried stabbing in the dark to see if I can get it working again- but I'm a little out of my depth!

gcc 5.1: test binary hangs on ws2811.c, line 330

Hello all,

I am currently trying to get the provided test program running.

I'm doing as told by the readme

scons
sudo ./test

but nothing happens, the process only takes around 100% cpu cycles.

I digged a bit deeper and found it to loop forever in ws2811.c, line 330

while (!(cm_pwm->ctl & CM_PWM_CTL_BUSY))
    ;

Surrounding the line with something like

printf("entering loop, file %s, line %d\n", __FILE__, __LINE__); fflush(stdout);
while (!(cm_pwm->ctl & CM_PWM_CTL_BUSY))
    ;
printf("exiting loop, file %s, line %d\n", __FILE__, __LINE__); fflush(stdout);

and running it, gives me

% sudo ./test
entering loop, file ws2811.c, line 330

Any idea on how to fix that?

I am using the following software on archlinuxarm, Raspberry Pi B+

% uname -r
4.0.9-1-ARCH

% gcc --version
gcc (GCC) 5.2.0
Copyright (C) 2015 Free Software Foundation, Inc.
Dies ist freie Software; die Kopierbedingungen stehen in den Quellen. Es
gibt KEINE Garantie; auch nicht für MARKTGÄNGIGKEIT oder FÜR SPEZIELLE ZWECKE.

% scons --version
SCons by Steven Knight et al.:
    script: v2.3.5.rel_2.3.5:3329:275e75118ad4, 2015/06/20 11:18:26, by bdbaddog on ubuntu1404-32bit
    engine: v2.3.5.rel_2.3.5:3329:275e75118ad4, 2015/06/20 11:18:26, by bdbaddog on ubuntu1404-32bit
    engine path: ['/usr/lib/python2.7/site-packages/SCons']
Copyright (c) 2001 - 2015 The SCons Foundation

Document use two PWM-channels

Document the comments below, as replied of the question issue below, as part of the README.

Was:
Hey Jeremy, thanks for this great effort! I've been looking to control NeoPixels straight from a Pi for some time now.

However, from quickly reading the docs and the code I cannot seem to extract whether or not multiple strings are supported and if so: how. It would be totally awesome if your library could allow something like Fadecandy without the additional Teensy.

Interference with wiringPi

I'm experiencing an unexpected behavior of wiringPi softPwm when used together with rpi_ws281x. I'm not using the hardware Pwm via wiringPi. Is this just due to misconfiguration of wiringPi or such interferences are to be expected?

Add support for GRB and BGR strips

Original Adafruit library allows to specify the strip type (RGB, GRB, BGR).

It would be nice if this package supported it as well.

Right now you have to modify the order of colors in neopixel.py, like this for GRB:

return (green << 16) | (red << 8) | blue

This has to be duplicated in the setBrightness method.

Support for all PIs?

Hey,

does this library support all PIs from 0 to 3?

In any case, could you put this in the Readme somewhere? Thanks!

Ill-specified size limits on display

I just tried this library via the 'test' binary on two 16x16 RGB123 displays chained together (thus 16x32). I found that I could set WIDTH to 16 and HEIGHT to 28 and successfully run (most of) the display. However, as soon as I increased HEIGHT higher, the binary would quit immediately with a return code of 255.

I looked around a little, and saw that this limit in dma_page_alloc was causing the error exit:

uint32_t pages = (size / PAGE_SIZE) + 1;
void *vaddr;
if (pages > 1)
{
    return NULL;
}

and I override that pages > 1 check manually. This let it run with WIDTH=16 and HEIGHT=32, however, it failed to actually reach the LEDs near the end of the chain.

What limit is at work here? This should probably be documented somewhere.

Brightness with setBrightness: 0 brightest and 255 darkest

If i set the brightness with the setBrightness-function from neopixel.py to 0, the leds are very bright and if i set it to 255, they are very dark. Is this a problem with my LED-Stripe (ws2812b) or did anyone else noticed this too and the doc-string should be modified?

First Pixel Stuck as Green

We are using Richards adapted version of the library and the first pixel in our units keep getting left as green. Any idea as to what we are doing wrong?

Pi3 support is broken.... for me

As part of the hyperion project, they have added revised support via this library.

It looks like rpi_ws281x/rpihw.c has the incorrect hardware version string.

//
// Pi 3 Model B
//
{
.hwver = 0xa22082,
// .hwver = 0xa02082,
.type = RPI_HWVER_TYPE_PI2,

SCons doesn't work on RPi

This looks like a really cool library, but unfortunately I cannot get it to work on my RPi. I've installed all the necessary dependencies it would require as written in your README file and on the Adafruit website. But when I run scons inside the directory, I just get 'Illegal instruction'. Even tried reinstalled Raspbian on a new SD card, but still same issue... Any ideas?

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.