Core Electronics Forum

Micropython _thread

Hello.
I have a D series pyboard.
I would like to establish a thread.

help (‘modules’)
main micropython ubinascii ure
_onewire network ubluetooth uselect
_uasyncio onewire ucollections usocket
_webrepl pyb ucryptolib ussl
builtins stm uctypes ustruct
cmath sys uerrno utime
dht uarray uhashlib utimeq
framebuf uasyncio/init uheapq uwebsocket
gc uasyncio/core uio uzlib
lcd160cr uasyncio/event ujson webrepl
lcd160cr_test uasyncio/funcs umachine webrepl_setup
lwip uasyncio/lock uos websocket_helper
math uasyncio/stream urandom
Plus any modules on the filesystem

…does not show availability of a threading module.
uasyncio looks like a mess, a path i would rather avoid.

Can anyone assist please?

Hello Andrew,

Okay, I’ll see what we can do for you. Do you have any other details about the issue? It’s a little difficult to interpret the information you’ve added so far.

Bryce
Core Electronics | Support

Good evening Bryce J

I don’t know what else to give you, the modules list does not contain a thread(ing) module, I don’t know where to find one

import thread

Traceback (most recent call last):

File “”, line 1, in

ImportError: no module named ‘thread’

Further:

help (‘modules’)

main micropython ubinascii ure

_onewire network ubluetooth uselect

_uasyncio onewire ucollections usocket

_webrepl pyb ucryptolib ussl

builtins stm uctypes ustruct

cmath sys uerrno utime

dht uarray uhashlib utimeq

framebuf uasyncio/init uheapq uwebsocket

gc uasyncio/core uio uzlib

lcd160cr uasyncio/event ujson webrepl

lcd160cr_test uasyncio/funcs umachine webrepl_setup

lwip uasyncio/lock uos websocket_helper

math uasyncio/stream urandom

Plus any modules on the filesystem

The threading module is _thread with a leading underscore, you can try to import that, but it doesn’t appear to be the installed list.

Pycom funded a project to port it to micropython in 2016, but I don’t know what the outcome was.

Check the micropython website. There are number of thread related modules available. You may find something suitable.

1 Like

Hello Bryce, I cannot find a thread(ing) module.

Thanks Robin, there are youtube videos by George the uP developer.

1 Like