Skip to content

Code to run a large LED array to debut at Electric Forest

Notifications You must be signed in to change notification settings

AaronVerDow/pulse

Repository files navigation

#pulse

Code to run a large LED array to debut at Electric Forest

unchanged

OPC Simulator

Get OPC from https://github.com/zestyping/openpixelcontrol

patgen/grid.json has the dimensions for our cube. It is generated by patgen.py

Compile OPC, copy grid.json to bin/ and then run: ./gl_server grid.json

This will launch a window with a graphical representation of the cube and will listen to OPC connections on port 7890

Duplicate TCP stream

This is a mechanism to listen on one port, and send it to two different ports.

  • 7889 - Listener
  • 7890 - gl_server (simulator)
  • 7891 - fcserver (actual LEDs)
mkfifo /tmp/second
nohup socat TCP-LISTEN:7889,fork SYSTEM:'tee /tmp/second | socat - "TCP:localhost:7890"' &
nohup socat -u /tmp/second,ignoreeof TCP:localhost:7891 &

If process listening on 7891 dies then second socat process dies. Port 7890 will still work, but second socat process must be restarted.

If process listening on 7890 dies then whatever is writing to port 7889 must be restarted in order to spawn a new process.

Service writing to port 7889 can be restarted at any time. It's possible to two processes to write to port 7889, this will cause bad things to happen.

If you see OPC errors it's possible there are too many socat processes running at the same time and the streams are being mangled.

About

Code to run a large LED array to debut at Electric Forest

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published