I have it wired through a logic level converter to bump the Pi output from 3 to 5V. I’m using the rpi_ws218x library to control the LEDs: https://github.com/jgarff/rpi_ws281x.
Things I have already tried:
Enable INITSYSTEM on
Removing the snd_bcm2835 module, which is known to conflict with the rpi_ws281x library.
I am using the resin-raspberrypi-node base image because I will be running a nodejs server from the pi to control the lights. Right now I am using the terminal on the dashboard to manually start the strandtest.py example from rpi_ws281x. The program runs, but there is no output to the lights.
Indeed I have done a WS2812B controller board! I used the Pi Zero W, but that shouldn’t matter. Thanks for the ping Gergely.
The things I notice about these two projects are:
Note that your link references a WS2812B string of lights, and your description states WS2812. They are different, most crucially around supply voltage. (I made the same mistake in my write-up)
My dockerfile pulls in a couple of extra dependancies, specifically scons & node-gyp
I dispensed with the logic level converter. The spec on the WS2812B will allow a supply voltage of quite a bit lower than the 5v, and a signal voltage of 0.7 * supply voltage. This means you can get the supply voltage low enough that the Pi can signal to it. Just noticed that my README recommends a fixed voltage 5v supply, which is wrong.
I am using all 5 meters of the strip, so I wanted to keep the input voltage as high as possible to avoid fading over the course of the strip. To that end I will be powering it from both sides with 5V 10A supplies (the full 5m could pull a max of 18A at full bright white). I was also trying to use the rpi-ws281x-native library after failing with the rpi_ws281x python library but have not yet had success.
Is there any reason I would be seeing no output? I even tried going into the Python terminal and writing few lines to toggle the output to pin 18 from HIGH to LOW and back again, but the lights remained unaffected. I know the strip is fine because when tested with an Arduino they perform as expected.
I ran into this issue yesterday and was hoping my issue on the rpi_ws281x_native GitHub would have been responded to by now, but I get this error when npm tries to install the library: ../src/rpi-ws281x.cc: In function ‘void init(const Nan::FunctionCallbackInfo<v8::Value>&)’: [main] ../src/rpi-ws281x.cc:100:38: error: no matching function for call to ‘v8::Object::HasOwnProperty(v8::Local<v8::String>&)’ [main] if(config->HasOwnProperty(symFreq)) { [main] ^ [main] ../src/rpi-ws281x.cc:100:38: note: candidates are: [main] [main] In file included from /root/.node-gyp/10.4.1/include/node/node.h:63:0,
Another issue referenced the same issue: https://github.com/beyondscreen/node-rpi-ws281x-native/issues/82
Their solution was to use an older version of node. What is the current node version for the resin/raspberry-pi-node image? Obviously this is not an issue on the resin side of things, I just really hope I can get it to work with a resin enabled device.
Indeed it was the node version that was causing the issue - rpi_ws281x_native isn’t yet compatible with node 10. Switching to an image with node 8 (resin/raspberry-pi-node:8) fixed the issue and I’m now in control of the lights! Thanks so much for all your help. Now on to the fun stuff…
Thanks for taking the time to close the thread off for future audiences, if you need any other help you know where to find us.
Oh, and feel free to update this thread when you’ve got some pictures!