artnet-node
artnet-node copied to clipboard
Examples
Hi Brian, this looks nice. Could you please add some examples, that i can jump on your code. I would like to use it and add some features. Currently, i build a OpenSource HArdware ArtNet Matrix Wall, and need a good lib to test some code-ideas. Your code looks like a good start.
Thanx a lot.
Hey @petershaw,
Sounds good to me! Currently, there are massively simple examples in the test dir, however I'll make it a note to get some more complete examples as well.
Would be great to have some comment on that test - what are all the magic numbers? I don't know what any of the 255s or 0s mean.
You should abstract the interface one more step to make it client.send(artnetport, dmxport, percentage); or similar. Passing an array of magic numbers isn't very nice to read code :)
Either way, <3
Each LED is represented by 3 values corresponding to RGB. The number value 0-255 is the intensity. The array can be any length (to a limit).
So, for example: First LED, solid blue = [0,0,255] First 3 LEDs, solid green = [0,255,0,0,255,0,0,255,0] First LED solid white, third LED solid red = [255,255,255,0,0,0,255,0,0]