Search found 4 matches

by hsmptg
Tue May 24, 2022 6:55 pm
Forum: ESP32 boards
Topic: urequests error: OSError: -202
Replies: 1
Views: 1668

urequests error: OSError: -202

Hi On a program that makes a GET request from api.openweathermap.org I am very often (but not always) getting the following error when using urequests.py: Connecting to network... ......... Connected! network config: ('10.0.5.187', '255.255.255.0', '10.0.5.1', '10.0.5.1') Traceback (most recent call...
by hsmptg
Fri Nov 29, 2019 9:07 pm
Forum: General Discussion and Questions
Topic: MicroPythonic way to non-blocking read a character from the serial USB port
Replies: 9
Views: 15339

Re: MicroPythonic way to non-blocking read a character from the serial USB port

Before posting, I tried that code on an ESP32 board with the actual firmware. You may have to update the firmware. I am using: MicroPython v1.11-611-g7f24c2977-dirty on 2019-11-29; ESP32 module (spiram) with ESP32 Detaching UART 0 does not seem to work like it is for the ESP8266. Well in fact I was...
by hsmptg
Fri Nov 29, 2019 6:54 pm
Forum: General Discussion and Questions
Topic: MicroPythonic way to non-blocking read a character from the serial USB port
Replies: 9
Views: 15339

Re: MicroPythonic way to non-blocking read a character from the serial USB port

There is still a simple function missing, which tells, whether and how many characters are available at sys.stdin. You can however use uselect.select() with a short timeout, e.g. import uselect import sys list = uselect.select([sys.stdin], [], [], 0.01) if list[0]: byte = sys.stdin.read(1) else: by...
by hsmptg
Fri Nov 29, 2019 12:24 pm
Forum: General Discussion and Questions
Topic: MicroPythonic way to non-blocking read a character from the serial USB port
Replies: 9
Views: 15339

MicroPythonic way to non-blocking read a character from the serial USB port

I would like to read the characters received through the serial USB connection of an ESP32-Pico-Kit board inside my main.py. I already used the sys.stdin.read(1) to read a single character but it halts the program execution while the user do not send that character. It is possible to do something si...