Skip to content

Instantly share code, notes, and snippets.

@hpwit
Created July 22, 2023 05:50
Show Gist options
  • Save hpwit/4effc96f24b5ec5678bcf57879945c1e to your computer and use it in GitHub Desktop.
Save hpwit/4effc96f24b5ec5678bcf57879945c1e to your computer and use it in GitHub Desktop.
#define DEBUG_ETHERNET_WEBSERVER_PORT Serial
// Debug Level from 0 to 4
#define _ETHERNET_WEBSERVER_LOGLEVEL_ 3
#include <WebServer_ESP32_W5500.h>
#include "I2SClocklessLedDriver.h"
#include "Arduino.h"
#include "artnetESP32V2.h"
#define NUM_LEDS_PER_STRIP 2700
#define NUMSTRIPS 9
#define NB_CHANNEL_PER_LED 3 //Should be 4 if your sending tool is sending RGBW
#define COLOR_GRB
#define UNIVERSE_SIZE_IN_CHANNEL 512 //here we define a universe of 170 pixels each pixel is composed of 3 channels
#define START_UNIVERSE 0
int pins[9] = { 13, 26, 14, 25, 26, 2, 15, 32, 33 };
#define NUMBER_OF_MAC 20
byte mac[][NUMBER_OF_MAC] = {
{ 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0x01 },
{ 0xDE, 0xAD, 0xBE, 0xEF, 0xBE, 0x02 },
{ 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0x03 },
{ 0xDE, 0xAD, 0xBE, 0xEF, 0xBE, 0x04 },
{ 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0x05 },
{ 0xDE, 0xAD, 0xBE, 0xEF, 0xBE, 0x06 },
{ 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0x07 },
{ 0xDE, 0xAD, 0xBE, 0xEF, 0xBE, 0x08 },
{ 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0x09 },
{ 0xDE, 0xAD, 0xBE, 0xEF, 0xBE, 0x0A },
{ 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0x0B },
{ 0xDE, 0xAD, 0xBE, 0xEF, 0xBE, 0x0C },
{ 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0x0D },
{ 0xDE, 0xAD, 0xBE, 0xEF, 0xBE, 0x0E },
{ 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0x0F },
{ 0xDE, 0xAD, 0xBE, 0xEF, 0xBE, 0x10 },
{ 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0x11 },
{ 0xDE, 0xAD, 0xBE, 0xEF, 0xBE, 0x12 },
{ 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0x13 },
{ 0xDE, 0xAD, 0xBE, 0xEF, 0xBE, 0x14 },
};
artnetESP32V2 artnet = artnetESP32V2();
I2SClocklessLedDriver driver;
void displayfunction(subArtnet *subartnet) {
driver.showPixels(NO_WAIT, subartnet->data);
}
// Select the IP address according to your local network
IPAddress myIP(192, 168, 40, 84);
IPAddress myGW(192, 168, 40, 1);
IPAddress mySN(255, 255, 255, 0);
void setup() {
Serial.begin(115200);
while (!Serial && (millis() < 5000))
;
driver.initled(NULL, pins, NUMSTRIPS, NUM_LEDS_PER_STRIP);
driver.setBrightness(20);
ESP32_W5500_onEvent();
ETH.begin(MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST);
ETH.config(myIP, myGW, mySN);
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(myIP);
}
ESP32_W5500_waitForConnect();
}
void loop() {
vTaskDelete(NULL);
}
@mdethmers
Copy link

Hey! I am getting an error when trying to compile this;

Compilation error: invalid conversion from 'void ()(subArtnet)' to 'void ()(void)' [-fpermissive]

Any idea what is going wring here?

@hpwit
Copy link
Author

hpwit commented Feb 2, 2024

Indeed I need to correct to code to follow the change in the latest version I’ll do it asasp

@mdethmers
Copy link

Ah, okay. Let me know if I can help! Trying to get ethernet and an esp32s2 w/ w5500 working on this. Would be sick to start pushing pixels at high framerates using this!

@mdethmers
Copy link

Hey! Any tips on what to change to make this work? Would love to get started on this. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment