beyondscreen / node-rpi-ws281x-native

native bindings to drive WS2811 (or WS2812) LED-Controllers on a Raspberry Pi
MIT License
224 stars 101 forks source link

[rpi-ws281x-native] it looks like you are not running on a raspberry pi #64

Closed socalledsound closed 6 years ago

socalledsound commented 7 years ago

Hello, I went through the same Adafruit tutorial that you linked to with a single neopixel on a raspberry pi 2 and am able to get a rainbow animation using their python code. I'd prefer to work in JS so thought I'd try out your library. Unfortunately when I run sudo node rainbow.js I get:

[rpi-ws281x-native] it looks like you are not running on a raspberry pi so there will be no functionality exposed by this module. For convenience, implementation stubs are provided.

Any ideas why this is happening? Help appreciated!

socalledsound commented 7 years ago

ps: is 'linux' in the pi detection code case senstive? when I run uname -a I get

Linux raspberrypi 4.9.41-v7+ #1023 SMP Tue Aug 8 16:00:15 BST 2017 armv7l GNU/Linux

b33son commented 7 years ago

Just FYI, this library works on Raspberry Pi Zero W. I've successfully got it working with OPC and OLA.

Granjow commented 7 years ago

@socalledsound it checks this:

if (process.arch !== 'arm' && process.platform !== 'linux')

Do those differ for you?

usefulthink commented 6 years ago

There are quite some raspberry-editions that might give false negatives with the current detection-code. The upcoming version will use completely rewritten code for that.

paulhayes commented 6 years ago

Hi there, I discovered this problem too, the rpi-version library hasn't been updated in two years! I've added the RpiZeroW cpu to the list of cpu info in the library and performed a pull request. Hopefully the maintainer will merge in the change soon!

https://github.com/ivsgroup/rpi-version/pull/4

usefulthink commented 6 years ago

@paulhayes Awesome, that did at least already land on master. Just needs a new version on npm now.