Skip to main content

All Questions

0 votes
0 answers
38 views

re.search() raises recursion depth error when in thread [duplicate]

In MicroPython, re.findall() does not exist. Therefore, I made one myself: def findAll(pattern, s, flags = 0): found = [] while True: m = re.search(pattern, s, flags) if m: ...
resurrected user's user avatar
0 votes
0 answers
115 views

Issue Running Async Web Server with Multi-Core Threading on Raspberry Pi Pico W

I'm working on a project using the Raspberry Pi Pico W 2 that involves displaying data from BLE sensors on a web page, with everything running on the Pico. My intention is to: Run an asynchronous web ...
qsf's user avatar
  • 13
0 votes
1 answer
265 views

How to have a piece of code continue to run throughout a function, while also allowing the other code to run?

My goal is when button A or B is pressed anytime throughout the whole function, it switches to a new process (screen). I am currently trying to use threading, but it is not working, and I am honestly ...
Tel e's user avatar
  • 1
0 votes
1 answer
151 views

How to use a LDR to control and fan and LED ring and a timer

I have a LDR, 5v fan and a ws2812 LED ring. When the LDR sees light I want the fan to turn off and the LED to turn on. When the LDR doesn't see light I want the LED to turn off and the fan to turn on ...
Mike's user avatar
  • 1
0 votes
0 answers
2k views

How to stop all threads in MicroPython?

I am building a system using MicroPython on a ESP32 using multi-threading, and MicroPython uses the _thread module, not the threading module. I want to be able to stop the execution of the whole ...
jcjuarez's user avatar
1 vote
1 answer
2k views

Threading on EV3 micropython

I am trying to write some code for my EV3 brick. I am really struggling to get multithreading to work. I am using threading module, it throws no error but function that are supposed to run on another ...
nicoebd's user avatar
  • 46
1 vote
0 answers
192 views

MicroPython usockets not timing out

For various reasons, I am trying to have my ESP32 device with MicroPython poll all 256 options of 192.168.1.*:79 to find a 'host' PC. In doing so, the ESP32 attempts to create a socket and connect it ...
Eugene's user avatar
  • 59
2 votes
1 answer
2k views

Micropython - Share variable in threads for funcions defined in diferent .py (files)

I have an ESP32 with Micropython firmware in it and I have two process in thread on it: Wi-Fi Connection with webpage interaction Neopixel led strip stuff What I want to do is to interact through ...
Braulio's user avatar
  • 555
4 votes
1 answer
143 views

How to write a function that takes another function and its arguments as input, runs it in a thread and destroys thread after execution?

I am trying to write a function in micropython that takes the name of another function along with arguments and keyword arguments, creates a thread to run that function and automatically exits the ...
midnightcoup's user avatar