Open davidpuetter opened 5 years ago
Is apache running with root priviledges? Ultimately the script needs to be run with root.
The way I did it was using express.js to handle http requests and running that script using root (sudo). I am not as familiar with how it gets called if youre using apache.
Hi, I'm attempting to create a web interface for controlling WS2812 LEDs. I managed to get the
rainbow.js
example working from the examples folder usingsudo node rainbow.js
and that worked fine. However I am now attempting to port this code over to my own use-case but it isn't working. I copied thews281x-native
stuff over and its related dependencies. The library initializes fine (loggingws281x
ininit()
shows the bindings and functions. However, callingws281x.render(this.pixelData);
yields no results, no errors.This script is being called from
index.html
running on an apache2 webserver on my RPI 3B+. Connections to the webserver work fine. No errors during load, either.Maybe I am misunderstanding how these work. Or I am possibly running it wrong, because I noticed that I run rainbow.js using
sudo node
but not the apache webserver. How could I use these two together?