├── TouchDesigner └── base_led.tox ├── Images └── SimpleMixer-Fucksleep.jpg ├── README.md └── Arduino └── TouchDesignerToFastLED.ino /TouchDesigner/base_led.tox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Richard-Burns/TouchDesignerToLEDs/HEAD/TouchDesigner/base_led.tox -------------------------------------------------------------------------------- /Images/SimpleMixer-Fucksleep.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Richard-Burns/TouchDesignerToLEDs/HEAD/Images/SimpleMixer-Fucksleep.jpg -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # TouchDesignerToLEDs 2 | A sample project to show how to take a TOP in TouchDesigner and send it via UDP to an arduino controlling WS2812B strips. 3 | 4 | This sends via UDP as I find it nicer to send data over Cat-7 for longer distances. This was tested with the following kit: 5 | - 1x Arduino Mega 6 | - 1x Arduino Mega Ethernet Shield (v2.0, not v1.0) 7 | - 5x 1M (1cm per pixel) WS2812B LED strips 8 | - 1x 5V LED Power Supply 9 | - 1x 20M CAT-7 Cable 10 | 11 | All in all the whole kit costed about 12,000 yenn from AliExpress and Akihabara. 12 | 13 | ### Things to Note 14 | 15 | UDP has a maximum send limit so you can only control up to 500 LEDs with one UDP packet. 16 | This is easily enough avoided by sending the data as 2 packets and then filling the LED arrays separately. 17 | 18 | ### Using this setup with SimpleMixer 19 | 20 | You can download the Fucksleep show I did for Club Mago in Nagoya as an example by switching to SimpleMixers "Fucksleep" branch. 21 | 22 | ![SimpleMixer Fucksleep Branch](Images/SimpleMixer-Fucksleep.jpg?raw=true "SimpleMixer Fucksleep Branch") 23 | -------------------------------------------------------------------------------- /Arduino/TouchDesignerToFastLED.ino: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | #include 5 | 6 | // here you need to put your own mac address 7 | byte mac[] = { 8 | 0x90, 0xA2, 0xDA, 0x0E, 0xF4, 0x91 9 | }; 10 | 11 | // and here you need to put the IP address you want your arduino to have. 12 | IPAddress ip(192, 168, 1, 11); 13 | unsigned int localPort = 3456; 14 | 15 | char packetBuffer[UDP_TX_PACKET_MAX_SIZE]; 16 | EthernetUDP Udp; 17 | 18 | // here we setup which data pin we want to send to and number of LEDs etc. 19 | #define DATA_PIN 3 20 | //#define CLK_PIN 4 21 | #define LED_TYPE WS2812B 22 | #define COLOR_ORDER GRB 23 | #define NUM_LEDS 500 24 | CRGB leds[NUM_LEDS]; 25 | #define BRIGHTNESS 225 26 | #define FRAMES_PER_SECOND 120 27 | int i = 0; 28 | 29 | void setup() { 30 | // handy to have a delay on startup so if FastLED crashes we don't lock ourselves out of the arduino. 31 | delay(3000); 32 | FastLED.addLeds(leds, NUM_LEDS).setCorrection(TypicalLEDStrip); 33 | FastLED.setBrightness(BRIGHTNESS); 34 | Ethernet.begin(mac, ip); 35 | 36 | // start UDP 37 | Udp.begin(localPort); 38 | 39 | } 40 | 41 | void loop() { 42 | 43 | // There is a limit of how many LEDs you can control with one UDP packet. I estimate it to be about 500 RGB LEDs. 44 | // If you want to control more than 500 you'll need to send 2 separate UDP packets. 45 | 46 | int packetSize = Udp.parsePacket(); 47 | 48 | if (packetSize) { 49 | Udp.read((char*)leds, NUM_LEDS * 3); 50 | } 51 | FastLED.show(); 52 | 53 | } 54 | 55 | --------------------------------------------------------------------------------