Search found 7 matches
- Wed Apr 14, 2021 2:49 pm
- Forum: General Discussion and Questions
- Topic: upip micropython-logging doesn't get last version of the module
- Replies: 0
- Views: 1036
upip micropython-logging doesn't get last version of the module
I would like to use the micropython-logging module available here: https://github.com/micropython/micropython-lib/tree/master/logging . To instal this module on my ESP32 board I've used upip: import upip upip.install('micropython-logging') I see that upip doesn't get the version on the master branch...
- Tue Apr 06, 2021 6:31 am
- Forum: General Discussion and Questions
- Topic: uasyncio error using Message class
- Replies: 3
- Views: 1469
Re: uasyncio error using Message class
Thanks Peter, how can I install v1.15?pythoncoder wrote: ↑Tue Apr 06, 2021 6:25 amYou need to run the latest daily build of firmware: ThreadSafeFlag will be supported in release build 1.15.
- Tue Apr 06, 2021 5:57 am
- Forum: General Discussion and Questions
- Topic: uasyncio error using Message class
- Replies: 3
- Views: 1469
uasyncio error using Message class
I'm running Micropython v1.14 and uasyncio v3.0.0 on ESP32 and I would like to use the Message class. I copied the primitives directory tree and its contents to the ESP32's filesystem as reported here: https://github.com/peterhinch/micropython-async/blob/master/v3/docs/TUTORIAL.md#111-primitives but...
- Mon Apr 05, 2021 4:14 pm
- Forum: General Discussion and Questions
- Topic: asyncio wait for task in a group
- Replies: 9
- Views: 3195
Re: asyncio wait for task in a group
Thanks for the support. I figured out the problem was the order of task scheduling: main asyncio.create_task(dht_measure(dht)) asyncio.create_task(update_display(display)) In this order the first event triggered from dht_measure was missed by update_display , maybe the scheduling require some time. ...
- Mon Apr 05, 2021 12:24 pm
- Forum: General Discussion and Questions
- Topic: asyncio wait for task in a group
- Replies: 9
- Views: 3195
Re: asyncio wait for task in a group
Thanks Peter, it is exactly what I looking for. I didn't realized that multiple tasks can trigger the same event. I've just have a little problem: async def dht_measure(d: DHT22): while True: global temp, hum d.measure() temp = d.temperature() hum = d.humidity() event.set() event.clear() await async...
- Mon Apr 05, 2021 8:57 am
- Forum: General Discussion and Questions
- Topic: asyncio wait for task in a group
- Replies: 9
- Views: 3195
Re: asyncio wait for task in a group
Thanks Kevin, I thought to do something similar but the problem is the continuous polling and the minimum amount of time to receive the next event (in this case 20ms). Is there another way to make the same stuff without polling? You can poll all events like: a=[event1,event2,event3] for event in a: ...
- Mon Apr 05, 2021 6:49 am
- Forum: General Discussion and Questions
- Topic: asyncio wait for task in a group
- Replies: 9
- Views: 3195
asyncio wait for task in a group
Hi all, I'm new to Asyncio (and MicroPython as well) and I'm writing a firmware for an ESP32. I need to update an LCD display every time one of multiple events is triggered. Let me give an example just to clarify: I have a task that reads from a DHT22 sensors (temperature and humidity) every two sec...