logo elektroda
logo elektroda
X
logo elektroda

[Solved] ESP8266 UDP Communication for Audio Data to WS2812B LED Strips

Dawidixxx 1248 4
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 18860880
    Dawidixxx
    Level 7  
    Heyka :) .

    I made myself a project a long time ago on an esp8266
    2x D1 mini receive the analogue data from the microphone and based on that display the number of leds in 1m ws2812b 144led/m strips.
    The problem is that I did this on a cable at the extremities of the room :/ (about 2 meters each between microphone and esp) I was then unable to establish a permanent fast wifi connection between the devices, and I would like to use the master role with the microphone as the 3rd device.

    The solution to the problem could be UDP on the ip of the router
    https://circuits4you.com/2018/01/01/esp-to-esp-communication/ second example
    - UDP because I don't need a reply, I just transmit audio from 3 esp with microphone and receive on esp with leds, not very sensitive data
    - router as a wifi carrier, previously during failed attempts the master had to maintain the connection between the others which was cumbersome, while sending information at the same time
    Just won't this solution strain the wifi in the house during operation?

    I still have communication via RF 433mhz in the back of my mind, but there should be a way to efficiently connect via wifi at the speed of sound :D .

    Greetings
  • ADVERTISEMENT
  • Helpful post
    #2 18861081
    khoam
    Level 42  
    Dawidixxx wrote:
    2x D1 mini receive the analogue data from the microphone and display the number of leds in 1m ws2812b 144led/m.
    .
    So audio transmission is not critical in terms of sound quality here? If you are only interested in "visualising" the audio, then it is better to use the ESP-NOW to send broadcasts between the ESP8266. You don't need an AP router then, the ESPs communicate directly.
    https://randomnerdtutorials.com/esp-now-esp8266-nodemcu-arduino-ide/

    Library in C++: https://github.com/yoursunny/WifiEspNow
  • ADVERTISEMENT
  • ADVERTISEMENT
  • Helpful post
    #4 18863028
    khoam
    Level 42  
    For ESP-NOW on the ESP8266, the maximum packet length must not exceed 256 bytes.
  • #5 18875525
    Dawidixxx
    Level 7  
    application of ESP-NOW!
ADVERTISEMENT