

Int TotalChannels = checkE131Headers(E131Buffer, packetSize) Į131Received(E131Buffer, TotalChannels) //process data function Int packetSize = Serial1.readBytes(E131Buffer,E131_BUFFER_MAX) //read data into buffer and output size. Return ChannelCount -1 //Return how many values are in the packet. Int ChannelCount = messagein * 256 + messagein // number of values plus start code If ( messagein = 0x10 & messagein = 0x41 & messagein = 0x37) Int checkE131Headers(unsigned char* messagein, int messagelength) Void E131Received(unsigned char* pbuff, int count) Serial1.begin(115200) //initialize serial input from ESP8266 Serial.begin(115200) //initialize serial for USB serial monitor

Unsigned char E131Buffer //buffer to hold incoming packet,

buffers for receiving and sending data Serial.write(E131Buffer,E131_BUFFER_SIZE) Ĭode on the Mega: // enter desired universe and subnet (sACN first universe is 1) I tried adjusting the serial baud rate from 115200 to 250000 but that did not seem to have any affect. The ESP8266 is connected to Serial1 on the Mega and I am using Serial0 to print to the serial monitor over USB. The longer I transmit E1.31 data, the latency increases when reading the output on the Mega. I’ve been able to get it to work but there is latency in the serial transmission. The ultimate goal is to control RGB pixels. I am attempting to use an ESP8266 to read E1.31 (SACN) data over WiFi and then send it out to a Mega 2560 over serial.
