Hi all, I am trying to replicate the success of people here to create Ethernet attached e1.31 controller.
I have multiple ESPixelSticks, but wifi is not always reliable enough and I am building 1 or 2 wired controllers for Christmas decorations.
I got the Crees code from svn (there seems to be a bracket in wrong position after latest commit) and tried also code seen in the thread.
The problem I am facing is that it seems not all universes or the last universe is not received/detected and "Leds.show();" is not called frequent enough.
Because of thes LEDs are updated every 0.5..1sec only.
I wanted to fix the tx issue before I got it up to github but for now you can grab from my dropbox link. Don't forget to remove it and place the original Ethernet library back so you can use it for your other arduino projects!
https://www.dropbox.com/sh/98vhmyne0ljqajx/AABi4gdWbbFnlzTu_wPg8hHma?dl=0
//DEFINES for at Compile time.
//Leave this alone. At current a full e1.31 frame is 636 bytes..
#define ETHERNET_BUFFER 636 //540 is artnet leave at 636 for e1.31
#define NUM_LEDS_PER_STRIP 680 //170
#define NUM_STRIPS 8
///GLOBALS
int unsigned DMX_UNIVERSE = 1; //**Start** universe 1, 9, 17, 25, 33, 41
int unsigned UNIVERSE_COUNT = 23; //How Many Universes 8, 8, 8, 4, 8, 8
int unsigned UNIVERSE_LAST = 23; // List the last universe typically its sequencially from start but does not have to. 8, 16, 24, 28, 32, 40
int unsigned CHANNEL_COUNT = 510; //max channels per dmx packet
byte unsigned LEDS_PER_UNIVERSE = 170; // Max RGB pixels
Hi Crees,
When using these settings:
int unsigned UNIVERSE_COUNT = 23; //How Many Universes 8, 8, 8, 4, 8, 8
int unsigned UNIVERSE_LAST = 22; // List the last universe typically its sequencially from start but does not have to. 8, 16, 24, 28, 32, 40
and printing :
if(packetSize){
Serial.println(packetSize);
Udp.read(packetBuffer,ETHERNET_BUFFER); //read UDP packet
I get a nice output of all
638
638
638
....
in the serial monitor.
Wen changing to 23 universes:
int unsigned UNIVERSE_COUNT = 23; //How Many Universes 8, 8, 8, 4, 8, 8
int unsigned UNIVERSE_LAST = 23; // List the last universe typically its sequencially from start but does not have to. 8, 16, 24, 28, 32, 40
the serial out put becomes:
638
...
638
638
638
638
65535
And at this 65535 it stops.
So, the error must be initiated in the processing of the upd packets, I guess.
I'm using the 'MegaPixel-One-Socket-Ethernet-masterV2_W5500' library.
I keep on investigating later.
//DEFINES for at Compile time.
//Leave this alone. At current a full e1.31 frame is 636 bytes..
#define ETHERNET_BUFFER 636 //540 is artnet leave at 636 for e1.31
#define NUM_LEDS_PER_STRIP 510 //170
#define NUM_STRIPS 8
///GLOBALS
int unsigned DMX_UNIVERSE = 1; //**Start** universe 1, 9, 17, 25, 33, 41
int unsigned UNIVERSE_COUNT = 24; //How Many Universes 8, 8, 8, 4, 8, 8
int unsigned UNIVERSE_LAST = 24; // List the last universe typically its sequentially from start but does not have to. 8, 16, 24, 28, 32, 40
int unsigned CHANNEL_COUNT = 510; //max channels per dmx packet
byte unsigned LEDS_PER_UNIVERSE = 170; // Max RGB pixels
Were you able to solve the problems with the TX buffer ?
So each port is set for 510 channels.
#elif defined(W5500_8K_BUFFERS)
SPIFIFO.write16(((addr << 0) & 0x4000) | 0x1400 | *buf++, // 8K buffers
((len > 1) ? SPI_CONTINUE : 0));
It may be better to start a new topic focusing on TX issues with x socket so it doesn’t hijack this one. I have ideas to use regular spi for tx instead of spififo to see if that fixes it. Start that new thread and Pm me the link so I can comment on it further.