Library for using addressable LEDs (such as NeoPixels/WS2812) with Firmata and JohnnyFive
dependabot[bot] on npm_and_yarn
chore: bump sinon from 13.0.2 t… (compare)
dependabot[bot] on npm_and_yarn
dependabot[bot] on master
chore: bump eslint from 8.14.0 … Merge pull request #305 from aj… (compare)
dependabot[bot] on npm_and_yarn
dependabot[bot] on npm_and_yarn
chore: bump eslint from 8.14.0 … (compare)
dependabot[bot] on npm_and_yarn
chore: bump eslint from 8.14.0 … (compare)
There's a proposal for the way the protocol should work here:
0 START_SYSEX 0xF0
1 PIXEL_COMMAND 0x51
2 PIXEL_SET_RANGE 0x06
3 max 14 bit index of FROM pixel in strip LSB
4 max 14 bit index of FROM pixel in strip MSB
5 max 14 bit index of TO pixel in strip LSB
6 max 14 bit index of TO pixel in strip MSB
7 24 bit packed RGB FROM color value LSB
8 24 bit packed RGB FROM color value lower middle bits
9 24 bit packed RGB FROM color value upper middle bits
10 24 bit packed RGB FROM color value MSB
11 24 bit packed RGB TO color value LSB
12 24 bit packed RGB TO color value lower middle bits
13 24 bit packed RGB TO color value upper middle bits
14 24 bit packed RGB TO color value MSB
15 END_SYSEX 0xF7
So by way of some additional information.
What you'd do is the following:
range
intermediary there because I think API wise there's a bunch of things we could do on a range for example shifting and cycling across a range of pixels as you sort of do on a Strip
already
I just spent the weekend installing LED bling into my kitchen. Maybe a little bit to the dismay of fiancé - but hey she knew that this was part of the deal when she met me :p! ANYWAY!
The setup is a strip of approximately 300 SK6812 RGBW LEDS, controlled by an Arduino MEGA (so i wouldn’t have to worry about memory constraints).
It already looks pretty good (native Adafruit RGBW test sketch)!
http://imgur.com/Ezx08bs
I’m a web dev by day, which means i have grand plans for controlling the setup remotely. Web control, native app, wifi switches - the works. And it turns out that there’s a bit of groundwork to do.
node-pixel needs me (or someone) to:
And while i’m at it, add back the interchange configuration option (ajfisher/node-pixel#93) - I have a MEGA, what even is small memory capacity? ;)
I’m a newbie (one day into it now) to the world of microcontrollers, interchange, backpacks, loading firmware. Send me your un-newbie-ifying reading recommendations please! In saying that, I won’t be doing anything quickly, and I will be asking for help.
So, hI! And be speaking to you guys soon!
nvm you probably can't fix that until you pad out the white channel. You could potentially hack that in the firmware to simply pad that byte with a zero for the moment.
In theory if you bump this to 4
it should pad out the last byte as well.
https://github.com/ajfisher/node-pixel/blob/master/firmware/src/libs/ws2812/ws2812.cpp#L15
No probs! I'm enjoying it! I'll try to implement it nicely tonight if I have time (instead of hacking it in) and send you a pull request. But i might resort to the hack on account of not really understanding a great deal of what I'm doing.
I was thinking of comparing the latest adafruit library and porting across node-pixel again to update it. I wouldn't mind the setBrightness() method. Although I'm sure it's not included already for a good reason.
@ajfisher Hi again! So I got my hands on a nano and followed the "I2C Backpack Installation" by installing the Arduino IDE, then uploading the backpack.ino (found in nedo-pixel/firmware/build/backpack). Then I ran the johnnyfive-i2c.js from the examples folder. Here is what I get:
1502418425559 Available /dev/ttyUSB0
1502418425611 Connected /dev/ttyUSB0
1502418435621 Device or Firmware Error A timeout occurred while connecting to the Board.
Please check that you've properly flashed the board with the correct firmware.
See: https://github.com/rwaldron/johnny-five/wiki/Getting-Started#trouble-shooting
If connecting to a Leonardo or Leonardo clone, press the 'Reset' button on the board, wait approximately 11 seconds for complete reset, then run your program again.
events.js:165
throw err;
^
Error: Uncaught, unspecified "error" event. ([object Object])
at Board.emit (events.js:163:17)
at Board.log (/home/pi/Workspace/neoPixelTest/node-pixel/node_modules/johnny-five/lib/board.js:635:8)
at Board.(anonymous function) [as error] (/home/pi/Workspace/neoPixelTest/node-pixel/node_modules/johnny-five/lib/board.js:646:14)
at Board.<anonymous> (/home/pi/Workspace/neoPixelTest/node-pixel/node_modules/johnny-five/lib/board.js:390:14)
at ontimeout (timers.js:386:14)
at tryOnTimeout (timers.js:250:5)
at Timer.listOnTimeout (timers.js:214:5)
I found a similar post in the issue list which dealing with the Frimata on an Uno and not the backpack. Could you please help us?