node.js


Raspberry pi 3 + node js controlling ws2811 leds


I am trying to control a string of rgb leds via my raspberry pi. I had this working via an arduino but I would like to do it directly from the pi.
I am using nodejs to do this, and the rpio library. I have connected the leds to the physical pin 19 (SPI - MOSI) and the ground to physical pin 39. Very similar to the arduino set up I had - basically a data and a ground connection. The power goes directly to the lights to take the load off the pi.
My issue is I cannot get the lights to turn on. I've been playing in the node repl trying to get it to work so the code I'm using is very basic:
const rpio = require('rpio');
rpio.spiBegin();
rpio.spiWrite(lights, lights.length);
I suspect its likely due to the lights buffer that I'm sending. Truth is I'm not sure what to send, right now I just populate a list with 50 (thats how many leds i have) 24 bit colors and then just convert it to a buffer with new Buffer(...).
I'm also not sure if my hardware is wired correctly. So any advice on that front also welcome.
If anyone provide a simple code snippet - preferably in nodejs - just so that I can test my lights are connected correctly. That way I can at least narrow down the problem to the software. If anyone has had experience with SPI using rpio any advice would also be helpful.
Pi pinout reference:
https://az835927.vo.msecnd.net/sites/iot/Resources/images/PinMappings/RP2_Pinout.png
The following is not my setup. I'm just using it to show I have 1 connection for 'data', a ground that is connected to pi and to the power supply. And then power straight to the lights (capacitor in that pic). Sorry this was the closest image I could find.
https://i.imgur.com/VP9iB1o.jpg
Ideally im trying to get to something like this:
https://www.youtube.com/watch?v=WLbLOEfoo8s
But I'd settle for 1 light turning on at this point ;)
I'm going to try and get in contact with the uploader aswell.
Let me know if any more info is required.
Any help is appreciated!

Related Links

Dependency warning IONIC
node-schedule read the value of a set timer
how to develop a api ai with node-js web application?
How do I know how to scale my Heroku app? (graphs included, but I don't know how to interpret them)
Mongoose using subquery in aggregation to sum data
Facebook login name field missing
$match aggregate not working with date range in node
npm run build doesn't seem to work
mongodb generate the same ObjectID when save data
Express next() wont invoke next middleware
Node.js call a function after n seconds of script runtime
Feathersjs administrator role (or feathers middleware with auth check)
nodejs debug cannot read property ref of undefined (NM[0] is undefined)
express cannot handle file extensions in URL
Fill Form and Captcha to enter in website
nodejs, socket.io and expressjs not connecting

Categories

HOME
neural-network
dll
datastax
knn
ignite
owasp
informix
mongoose
appium
powerbuilder
uwp-xaml
google-cloud-kms
login
timezone
jboss-eap-6
visual-foxpro
raspberry-pi3
quandl
protege
fluent-assertions
pivot-table
log4net
denial-of-service
border
laravel-blade
google-app-invites
gulp-sass
moshi
cookie-session
google-cloud-vision
uiinterfaceorientation
eof
apl
floyd-warshall
size-classes
u2
python-tesseract
chmod
sublimerepl
regex-negation
netbanx-api
thinktecture-ident-model
webmin
audiokit
card-flip
ats
gulp-usemin
libphonenumber
falcor
data-processing
slam
api-manager
nsfontpanel
matlab-uitable
synopsys-vcs
rollbar
helium
rate
syncsort-dmx-h
strstream
spoon
markov-models
powergrep
snap-lang
octopress
mindbody
traffic-simulation
busy-waiting
steroids
wordpress-4.5
template-strings
xlet
typescript1.7
savefiledialog
setlocale
zipcode
visual-studio-2010-sp1
ilias
ember-qunit
javascript-databinding
dav
sine-wave
kif-framework
bonjour
mathgl
linq-to-lucene
usermode
amazon-simpledb
styledtext
real-time-data
jvm-crash
jpreloader
visual-assist-x
clang-complete
scopes
cgpoint
iasyncresult
cocos2d-python
django-generic-views
dft
viewexpiredexception
nsenumerator
clean-language
oracle8i
installshield-2008
html-rendering
urldecode
projective-geometry
open-basedir
google-notebook
flashlite
task-tracking

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App