Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wifi interrupt function for receiving data #1995

Closed
josefinHeilig opened this issue Oct 23, 2018 · 3 comments
Closed

Wifi interrupt function for receiving data #1995

josefinHeilig opened this issue Oct 23, 2018 · 3 comments

Comments

@josefinHeilig
Copy link

Hi everyone,

I connected several ESP32s as clients each with a static IP with a local Wifi server (my computer) using UDP.

I am wondering if there is a way to use a kind of wifi on event function which only interrupts the main task of the ESP, when the needed information has filled up the read buffer.

The udp.read() function is slowing down the main loop in irregular intervals which is problematic.

How should I approach this?

So far I only found examples for WifiEvent when the ESP is used as a server.

Should I maybe write my own function inside of the Wifi library so I can already be specific on the data that I am sending to the clients?
If yes how?

Thanks in advance and I hope I am clear enough about my problem. If not I am there for clarification.

Cheers, jh

@bertmelis
Copy link
Contributor

bertmelis commented Oct 23, 2018

@josefinHeilig
Copy link
Author

Hi, we are using UDP. At the moment we have 10 omniwheel robots steered over wifi. They were just moving a bit jerky because the motors were not moving while the udp buffer was filling.
So I will have a look at the AsyncUDP, it sounds promising.
Thanks :)

@josefinHeilig
Copy link
Author

Hi again,
so I managed to get the AsyncUDP library running. I had to use Git Gui / Bash to update to the latest IDF for that, so now its v3.2-dev-1055-g3276a1316 .
The AsyncUDP server example works fine, while the client example would only broadcast data, but never received any.
But I guess that's fine for me for now. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants