Skip to content

Pixel Command Protocol

Lucas Morgan edited this page Dec 29, 2018 · 2 revisions

Controlling the PxlNode's LEDS via commands:

If you already have TouchDesigner installed, you can see the python examples of many of the command examples setup here: TouchDesigner\Command\scanning_and_commands_SIMPLE.toe

In many scenarios, you'll want to interact with the lights via commands. This would operate in very much the same way one would operate a Phillips Hue type product. This is great if want a higher level, light weight command structure that won't tax the network as much.

Command message's are structured like this:

  • [ command ]
  • [ startColor ] (optional)
  • [ endColor ]
  • [ repetitions ]
  • [ frames per repetition ]

Some actual examples - any one of the lines below are a complete command:

blank
pulse rgb0,0,0 t10 f30 rgb32,0,0
blink rgb32,0,0 rgb0,0,32 t10 f20
hue rgb32,0,0 rgb0,0,32 t10 f60
hue2 rgb32,0,0 rgb0,0,32 t10 f30
huehsl hsl0,100,50 hsl359,100,50 f360 t1
huehsb hsb0,100,0 hsb0,100,100 f360 t1

If you want to fade from whatever color you ended up after the last command, to a new color you can leave out the start color and only set 1 repetition over a short period of time. The following example will tell the PxlNode to change from it's current color, to a dim red, over the course of half a second. (30 frames)

hue2 rgb32,0,0 t1 f30

Once you have a command put together as a simple string, you'll send that to your PxlNode as a POST command where plain='argument' ( not as raw post data )

The address you send the POST command to would look like this: 192.168.1.xxx/play