artnet-node icon indicating copy to clipboard operation
artnet-node copied to clipboard

Examples

Open petershaw opened this issue 11 years ago • 4 comments

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.

petershaw avatar Feb 12 '14 14:02 petershaw

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.

BrianMMcClain avatar Feb 12 '14 15:02 BrianMMcClain

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

sirsquidness avatar Mar 18 '14 10:03 sirsquidness

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]

justinireland avatar Aug 29 '14 23:08 justinireland