Can I use urequest asynchronously, when it needs to wait for a response? #16634
Unanswered
jochen-rath
asked this question in
Other
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello
I have developed my own Lyrion Media Server (LMS) RFID controller:
https://github.com/jochen-rath/rfidLmsSteuerung
or
https://github.com/jochen-rath/rfidLmsSteuerung/blob/main/squeezeplayerSteuerung.py
It works quite well, but I get problems, when the wlan connection between my esp32 board and the access point is disturbed, e.g by distance or walls. It seems, that it takes to long for the board to get a response from the LMS, so the board doesn't query, if a RFID card is present.
I have personally no clue about asynchronous programming. But as far as I understand it, when I try this, the urequest query will run in background and the board can still query the rfid card reader. But I need the response of the urequest, to display on the screen. And can I send a second urequest command to the same server, while the first one is still processed?
Is this possible while programming this asynchronously.
Or is there another way to solve my problems with a RFID reader, which doesn't query the card, e.g. with interrupts.
Beta Was this translation helpful? Give feedback.
All reactions