Implementing PIX565 a protocol that reduces UDP payload

A project log for udpx

udpx is is a technology to transport data over WiFi to microcontrollers, supporting decompression

Martin FasaniMartin Fasani 5 days ago0 Comments

Just for a quick resume check this tweet:

Modified slightly udpx pixels library to add a new header byte:

byte[0]protocol[80,82]P (888)R is 565
byte[1]non used0
byte[2]chunk LSB 16 bit LSB
byte[3]chunk MSB
byte[4]Length of payload LSB 16 bit LSB
byte[5]Length of payload MSB
First byte[0] is very important since identifies protocol type

P 0x50 is Pixels, a byte per color. So it takes 3000 bytes to feed a 1000 pixels RGB Led matrix

R 0x52 is 565, using 5 bits for Red, 6 for Green and 5 for Blue. So it reduces the color brightness gradients in 31 for R/B and 63 for Green. But it also resuces in 1/3 the udpx payload, using only 2000 bytes to feed every pixel of a 1000 RGB Matrix.

That makes everything faster since it's also ZLIB compressed in the App and decompressed in the ESP32 using miniz library.

Proof-of-concept videos
udpx Android application last releases