ESP32-sveltekit
ESP32-sveltekit copied to clipboard
Sending and receiving UDP packets
Hi there,
I want to implement a few services broadcasting UDP packets into the network and receiving UDP from the network.
- sending an UDP package when something changes (so other instances can react to it -> 100 B / packet)
- Sending an UDP package every x seconds with current status (so instances are aware of each other and can implement synchronized clocks -> 1400 B / packet)
- Receiving UDP packages for above events
- Sending all RGB LED values about 50 times per second (to send to Art-net decoders, related to this is Ethernet support -> 12288 x 3 x 50 = 1.843.200 B/s and more !)
- Receiving UDP packages from instances sending out audio data (frequency spectrum, 16 bins, about 20 times per second -> 16 x 20 = 320B/s)
- …
Advice was to look at MQTT implementation but struggle a bit how to do it, also taking into account the high data rates for Art-net. I am looking for a bit of guidance how to do it the right way, eg by laying out some skeleton files, classes and functions: what to define where and how to call it from ‘modules’ which need to use these services.
Thanks for help.