Created
July 12, 2023 11:47
-
-
Save hpwit/377a307610706d35755083b4e2b57a9f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <WiFi.h> | |
#include "Arduino.h" | |
#include "artnetESP32V2.h" | |
#define NUM_LEDS_PER_STRIP 270 | |
#define NUMSTRIPS 8 | |
#define NB_CHANNEL_PER_LED 3 //Should be 4 if your sending tool is sending RGBW | |
#define UNIVERSE_SIZE_IN_CHANNEL 510 | |
#define START_UNIVERSE 0 | |
int pins[8] = { 13, 26, 14, 25, 26, 2, 15, 32 }; | |
#include "I2SClocklessLedDriver.h" | |
artnetESP32V2 artnet = artnetESP32V2(); | |
I2SClocklessLedDriver driver; | |
void displayfunction(subArtnet *subartnet) { | |
driver.showPixels(NO_WAIT, subartnet->data); | |
} | |
void setup() { | |
Serial.begin(115200); | |
Serial.printf("Connecting "); | |
WiFi.begin("laderaum-led-router", "blink-blink666"); | |
while (WiFi.status() != WL_CONNECTED) | |
{ S | |
erial.println(WiFi.status()); | |
delay(500); Serial.print("."); | |
} | |
Serial.println(""); | |
Serial.println("WiFi connected."); | |
Serial.println("IP address: "); | |
Serial.println(WiFi.localIP()); | |
driver.initled(NULL, pins, NUMSTRIPS, NUM_LEDS_PER_STRIP); | |
driver.setBrightness(20); | |
artnet.addSubArtnet(START_UNIVERSE, NUM_LEDS_PER_STRIP * NUMSTRIPS * NB_CHANNEL_PER_LED, UNIVERSE_SIZE_IN_CHANNEL, &displayfunction); | |
if (artnet.listen(6454)) { | |
Serial.print("artnet Listening on IP: "); | |
Serial.println(WiFi.localIP()); | |
} | |
} | |
void loop() { | |
vTaskDelete(NULL); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment