micropython-esp32 | Old port of MicroPython to the ESP32 -- new port
kandi X-RAY | micropython-esp32 Summary
kandi X-RAY | micropython-esp32 Summary
Old port of MicroPython to the ESP32 -- new port is at https://github.com/micropython/micropython
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of micropython-esp32
micropython-esp32 Key Features
micropython-esp32 Examples and Code Snippets
Community Discussions
Trending Discussions on micropython-esp32
QUESTION
I'm trying to code a simple program for a ESP32 board. My main program is fairly simple and it has to run on a loop. On the side, the device also needs to be able to respond to HTTP requests with a very simple response.
This is my attempt (a rework of https://randomnerdtutorials.com/micropython-esp32-esp8266-bme280-web-server/):
...ANSWER
Answered 2021-Jan-09 at 19:57The problem is that s.accept()
is a blocking call...it won't return until it receives a connection. This is why it pauses your loop.
The easiest solution is probably to check whether or not a connection is waiting before calling s.accept()
; you can do this using either select.select
or select.poll
. I prefer the select.poll
API, which would end up looking something like this:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install micropython-esp32
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page