Closed Xdevel0per closed 9 months ago
I2s library manages well this amount of leds on it's own But the artnet_v2 library doesn't
And also I want to know more about when to use the full dma buffer
Sorry bud for interrupting I appreciate it and I appreciate your work 🙏🤍
Hello That should not be the problem. At which fps are you sending the data ? Because 1020 leds will be running at 30fps max so it could be an issue. Can you share the code please ? Let me add couple of more verbose for you to find the why. I will push a new version soon. I can manage to receive 73 universes for 12000 leds https://youtu.be/sYtVOU8Hpss?si=WGzhQ64CStjREK12 Yves
I tried sending the data at 10 , 20 , 24 , 30 , 40 , 60 fps None of them worked
to more specefiy my issue: when i try to declare a subartnet larger then 35 universes it breaks and doesn't manage to create the artnet buffers for it
When I start the esp it logs in debug that it's creating different buffers then it says Impossible to create buffer 7
heres the code and i want to know if its even possible to drive 2040 leds x 8 ports or 1020 leds x 16 ports
// Debug Level from 0 to 4
int pins[NUMSTRIPS] = { 13, 12, 14, 27, 26, 25, 33, 32 };
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(void param) { subArtnet subartnet = (subArtnet *)param; driver.showPixels(NO_WAIT, subartnet->data); }
IPAddress myIP(192, 168, 1, 10); IPAddress myGW(192, 168, 1, 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, ORDER_RGB); driver.setBrightness(255);
ESP32_ENC_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); artnet.setNodeName("Arnet Node esp32");
if (artnet.listen(6454)) { Serial.print("artnet Listening on IP: "); Serial.println(myIP); }
ESP32_ENC_waitForConnect(); }
void loop() { vTaskDelete(NULL); }
Hello The fact that it can't create all the buffers is not an issue it will not block the program What is that line ?
ESP32_ENC_waitForConnect();
If it's for the connection it should be before the if (artnet.listen(6454)) ... Can you post the full serial output of the verbose please.
Can you maybe first remove the use of the webserver ?
Hello Thank you for ur effort to help and I'm sorry for interrupting you The code I have is the same code you posted about working with the library via Ethernet The only thing I changed was the leds count and the library Webserver_esp32_w5500 To Webserver_esp32_enc
This exact code works in 5108 24universes but not 10208 48 universes
I'll post you the serial log in a minute Thanks again ❤️🙏
heres the output
ets Jun 8 2016 00:22:57
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) configsip: 0, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:1 load:0x3fff0030,len:1344 load:0x40078000,len:13964 load:0x40080400,len:3600 entry 0x400805f0 [ 4][D][esp32-hal-cpu.c:244] setCpuFrequencyMhz(): PLL: 480 / 2 = 240 Mhz, [ 11][V][I2SClocklessLedDriver.h:1067] __initled(): [I2SClocklessLedDriver] xdelay:31 [ 30][V][WiFiGeneric.cpp:438] _arduino_event_cb(): Ethernet Started [ 30][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 18 - ETH_START
ETH Started [ 83][I][artnetESP32V2.cpp:233] _initialize(): [ARTNETESP32] Initialize subArtnet Start Universe: 0 end Universe: 47, universes 48 [ 84][I][artnetESP32V2.cpp:204] createBuffers(): [ARTNETESP32] Creation of buffer 0 [ 91][I][artnetESP32V2.cpp:204] createBuffers(): [ARTNETESP32] Creation of buffer 1 [ 99][I][artnetESP32V2.cpp:204] createBuffers(): [ARTNETESP32] Creation of buffer 2 [ 107][I][artnetESP32V2.cpp:204] createBuffers(): [ARTNETESP32] Creation of buffer 3 [ 114][I][artnetESP32V2.cpp:204] createBuffers(): [ARTNETESP32] Creation of buffer 4 [ 122][I][artnetESP32V2.cpp:204] createBuffers(): [ARTNETESP32] Creation of buffer 5 [ 130][I][artnetESP32V2.cpp:204] createBuffers(): [ARTNETESP32] Creation of buffer 6 [ 138][I][artnetESP32V2.cpp:185] createBuffers(): [ARTNETESP32] impossible to create the buffer 7 [ 146][I][artnetESP32V2.cpp:197] createBuffers(): [ARTNETESP32] nb total of buffers:7 [ 154][I][artnetESP32V2.h:488] _udp_task_start(): [ARTNETESP32] QUEUES CREATED [ 161][I][artnetESP32V2.h:376] _udp_task_subrarnet(): [ARTNETESP32] Start listening task [ 161][V][artnetESP32V2.h:424] _udp_task_subrarnet_handle(): [ARTNETESP32] _udp_task_subrarnet_handle set on core 1 [ 169][I][artnetESP32V2.h:381] _udp_task_subrarnet(): [ARTNETESP32] subArtnet nr:0 start universe:0 Nb Universes: 48 artnet Listening on IP: 192.168.1.10 [ 20033][V][WiFiGeneric.cpp:431] _arduino_event_cb(): Ethernet Link Up [ 20033][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 20 - ETH_CONNECTED [ 20034][V][WiFiGeneric.cpp:446] _arduino_event_cb(): Ethernet got newip:192.168.1.10 ETH Connected [ 20054][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 22 - ETH_GOT_IP [ 20054][D][WiFiGeneric.cpp:1138] _eventCallback(): ETH IP: 192.168.1.10, MASK: 255.255.255.0, GW: 192.168.1.1 ETH MAC: EC:94:CB:6C:F5:73, IPv4: 192.168.1.10 FULL_DUPLEX, 10Mbps E (20081) enc28j60: no mem for receive buffer
I see that the eth driver do not have enough memory. Got to the file artnetesp32v2.cpp
Line 23
Change 10 to 3
And retry
Let me know
I'll try as soon as possible and I'll let u know
Sorry I was so ill I'll try today and I'll give you my output
Also another important question
In industrial artnet controllers we have the ability to wire up the master controller to slaves using Ethernet So we have an Ethernet wire from to the master and another from the master to the slave and from slave to slave so each one has an input and an output Is there's anyway to do that ?
Hello, I hope you're doing better. Let me know if this solves your issues answer to your questions; >> Q: heres the code and i want to know if its even possible to drive 2040 leds x 8 ports or 1020 leds x 16 ports A: the more pins the better because your refresh rate will be higher. if you're not against a bit of soldering I would suggest to migrate to the virtual-in driver with will allow you to have 32 strips of 510 leds using only (6 pins of the esp32 1 clock 1 latch 4 data pins)
>>Q: So we have an Ethernet wire from to the master and another from the master to the slave and from slave to slave so each one has an input and an output Is there's anyway to do that A: I don"t know if it can be done with an esp32 because that would mean your master is also an ethernet router (unless in that case it's not real TCP IP but another protocol just using ethernet as a medium) do you have some product in mind so I can look it up
think with me What if we didn't use Ethernet for output What's the best protocol we can transfer through the data from one esp32 to the other Maybe serial or i2c And we can still use Ethernet as a port but not as a protocol
I've tried the new change about the nb of buffers It's working but it's soo laggy I'm getting about 0.3fps from 48 universes And I even tried 6 max buffers Still the same results
I'll try to split the subnets for individual universes to see if it'll have any change
Update It's still laggy but when I declare the universes each starting from univ0 to univ48 now it says no mem for receive buffer and crashes
didnt manage to output more than 1fps and also the artnet poll isnt working
heres the full code
// Debug Level from 0 to 4
int pins[NUMSTRIPS] = { 13, 12, 14, 27, 26, 25, 33, 32 };
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(void param) { subArtnet subartnet = (subArtnet *)param; driver.showPixels(NO_WAIT, subartnet->data); }
IPAddress myIP(192, 168, 1, 10); IPAddress myGW(192, 168, 1, 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, ORDER_RGB); driver.setBrightness(255);
ESP32_ENC_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); artnet.setNodeName("Arnet Node esp32");
if (artnet.listen(6454)) { Serial.print("artnet Listening on IP: "); Serial.println(myIP); }
ESP32_ENC_waitForConnect(); }
void loop() { vTaskDelete(NULL); }
heres the full log
ets Jun 8 2016 00:22:57
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) configsip: 0, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:1 load:0x3fff0030,len:1344 load:0x40078000,len:13964 load:0x40080400,len:3600 entry 0x400805f0 [ 4][D][esp32-hal-cpu.c:244] setCpuFrequencyMhz(): PLL: 480 / 2 = 240 Mhz, [ 11][V][I2SClocklessLedDriver.h:1067] __initled(): [I2SClocklessLedDriver] xdelay:31 [ 30][V][WiFiGeneric.cpp:438] _arduino_event_cb(): Ethernet Started [ 30][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 18 - ETH_START
ETH Started [ 83][I][artnetESP32V2.cpp:233] _initialize(): [ARTNETESP32] Initialize subArtnet Start Universe: 0 end Universe: 47, universes 48 [ 84][I][artnetESP32V2.cpp:204] createBuffers(): [ARTNETESP32] Creation of buffer 0 [ 91][I][artnetESP32V2.cpp:204] createBuffers(): [ARTNETESP32] Creation of buffer 1 [ 99][I][artnetESP32V2.cpp:204] createBuffers(): [ARTNETESP32] Creation of buffer 2 [ 107][I][artnetESP32V2.cpp:204] createBuffers(): [ARTNETESP32] Creation of buffer 3 [ 114][I][artnetESP32V2.cpp:204] createBuffers(): [ARTNETESP32] Creation of buffer 4 [ 122][I][artnetESP32V2.cpp:204] createBuffers(): [ARTNETESP32] Creation of buffer 5 [ 130][I][artnetESP32V2.cpp:210] createBuffers(): [ARTNETESP32] nb total of buffers:6 [ 28033][V][WiFiGeneric.cpp:431] _arduino_event_cb(): Ethernet Link Up [ 28033][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 20 - ETH_CONNECTED [ 28034][V][WiFiGeneric.cpp:446] _arduino_event_cb(): Ethernet got newip:192.168.1.10 ETH Connected [ 28054][D][WiFiGeneric.cpp:1039] _eventCallback(): Arduino Event: 22 - ETH_GOT_IP [ 28054][D][WiFiGeneric.cpp:1138] _eventCallback(): ETH IP: 192.168.1.10, MASK: 255.255.255.0, GW: 192.168.1.1 ETH MAC: EC:94:CB:6C:F5:73, IPv4: 192.168.1.10 FULL_DUPLEX, 10Mbps [ 28137][I][artnetESP32V2.h:488] _udp_task_start(): [ARTNETESP32] QUEUES CREATED [ 28138][I][artnetESP32V2.h:376] _udp_task_subrarnet(): [ARTNETESP32] Start listening task [ 28138][V][artnetESP32V2.h:424] _udp_task_subrarnet_handle(): [ARTNETESP32] _udp_task_subrarnet_handle set on core 1 [ 28141][I][artnetESP32V2.h:381] _udp_task_subrarnet(): [ARTNETESP32] subArtnet nr:0 start universe:0 Nb Universes: 48 artnet Listening on IP: 192.168.1.10
Hello sorry for the delay I have been asking around, which board are you using ? Someone I know is using the THE01 and does not have any issues Reagrds
Do you mean the esp01 ? I'm using esp32 dev board v1
No the esp eth-01 it's an esp32 with Ethernet. You're using wich ethernet add on ?
When I try the library using 8 strips (8 pins) each one using 1020 leds combining i2s_clockless_led_driver
In verbose log it says impossible to create buffer 7 And never calls the display function
I want to know what's the maximum limits of this library Thx 🙏❤️