adafruit / Adafruit_CircuitPython_asyncio

CIrcuitPython subset of CPython asyncio library
MIT License
26 stars 17 forks source link

Better tutorials in using Asyncio? #46

Closed djairjr closed 3 months ago

djairjr commented 1 year ago

I'm developing some puzzles for Escape Room and I'm porting some of my solutions to Circuitpython. But I'm having some difficulty with the idea of multi-tasking. I'm using Asyncio and even managed to put a countdown running at the same time as one of my games. But I couldn't figure out yet how I could make these two tasks communicate. I noticed that Asyncio has an Events feature, and many others, but there is no specific tutorial and no examples. I'm working on the basis of trial and error. If I have any miraculous understanding, I will write something and notice to you. But in the meantime, I signal this lack here.

FoamyGuy commented 1 year ago

This guide covers the topic quite well: https://learn.adafruit.com/cooperative-multitasking-in-circuitpython-with-asyncio including a section on how to communicate between different tasks.

djairjr commented 1 year ago

Not enough. I' ve already read it...

djairjr commented 1 year ago

I will post my code this afternoon.

FoamyGuy commented 3 months ago

resolved by #67. If there are other specific tutorials or examples that anyone would like to propose we can open another issue in the future.