Search found 969 matches
- Sun Apr 26, 2020 6:25 pm
- Forum: ESP8266 boards
- Topic: Get return elements from task async function
- Replies: 15
- Views: 6614
Re: Get return elements from task async function
For retrieve uasyncio v3.0 lib version, i can download it at https://github.com/micropython/micropyt ... d/uasyncio) and put inside "/lib/" directory as module on ESP8266.. Or frozen it before compile new custom firmware, right? This might be one way but the better way would be to enable uasyncio b...
- Sun Apr 26, 2020 6:23 pm
- Forum: ESP8266 boards
- Topic: Get return elements from task async function
- Replies: 15
- Views: 6614
Re: Get return elements from task async function
@kevinkk525 I have but I don't know what these sizes tell you about fitting on small boards as I have no experience of them: Not completely sure but I always assumed that the size of firmware-combined.bin is the actual firmware size. The difference between the module size and the firmware would be ...
- Sun Apr 26, 2020 5:46 am
- Forum: ESP8266 boards
- Topic: Get return elements from task async function
- Replies: 15
- Views: 6614
Re: Get return elements from task async function
You can try to build the firmware yourself with uasyncio included.
My firmware builds were always a lot smaller than 1M so I'm not sure why uasyncio would be dropped for the 1M firmware but I haven't yet built a firmware for the esp8266 with the new uasyncio.
My firmware builds were always a lot smaller than 1M so I'm not sure why uasyncio would be dropped for the 1M firmware but I haven't yet built a firmware for the esp8266 with the new uasyncio.
- Sat Apr 25, 2020 5:16 pm
- Forum: Other Boards
- Topic: [Windows / Linux] Error: 'module' object has no attribute 'Pin'
- Replies: 5
- Views: 3055
Re: [Windows / Linux] Error: 'module' object has no attribute 'Pin'
The Unix port of micropython does not have that because it has no hardware pins.
If you want to use the Unix build for debugging, you will have to provide a "fake" machine module implementation.
If you want to use the Unix build for debugging, you will have to provide a "fake" machine module implementation.
- Fri Apr 17, 2020 5:53 am
- Forum: General Discussion and Questions
- Topic: Can there be 2 python programs running at the same time?
- Replies: 8
- Views: 4259
Re: Can there be 2 python programs running at the same time?
Easy example: mqtt uses sockets but multiple asyncio tasks can send messages. Each send operation might need multiple steps with "await" in between but the currently sending task has to prevent other asyncio tasks from using the socket until the transmission is finished. Therefore a lock is used.
- Thu Apr 16, 2020 7:30 am
- Forum: General Discussion and Questions
- Topic: Multiple Onewire bus connections
- Replies: 4
- Views: 2884
Re: Multiple Onewire bus connections
Try pull-up with only ~1.3k
- Wed Apr 15, 2020 8:14 pm
- Forum: General Discussion and Questions
- Topic: (u)asyncio task cancellation spreading like a virus
- Replies: 11
- Views: 8544
Re: (u)asyncio task cancellation spreading like a virus
I made a PR to implement shield: https://github.com/micropython/micropython/pull/5928
- Tue Apr 14, 2020 6:08 am
- Forum: General Discussion and Questions
- Topic: (u)asyncio task cancellation spreading like a virus
- Replies: 11
- Views: 8544
Re: (u)asyncio task cancellation spreading like a virus
My tutorial should warn against cancellation of Task instances. No, cancelling Tasks is a crucial part of working with uasyncio and works just fine. It's good to use it. @kevinkk525 What do we conclude from this? I see one conclusion and a question. I would advise against awaiting other tasks unles...
- Mon Apr 13, 2020 4:55 pm
- Forum: General Discussion and Questions
- Topic: (u)asyncio task cancellation spreading like a virus
- Replies: 11
- Views: 8544
Re: (u)asyncio task cancellation spreading like a virus
Yeah Futures and Tasks are another perfect example of looking for trouble.. To be honest I haven't really done much with futures and the last time I looked at these was a few years ago. There have been so many changes in CPython asyncio since, I don't know if it even works the same anymore. If I had...
- Mon Apr 13, 2020 4:16 pm
- Forum: General Discussion and Questions
- Topic: (u)asyncio task cancellation spreading like a virus
- Replies: 11
- Views: 8544
Re: (u)asyncio task cancellation spreading like a virus
Yeah there are some more interesting scenarios with asyncio. You could e.g. take the same code as above and cancel an awaiter(). That throws a CancelledError inside the awaiter() in "await t" but how do you know if Task t got cancelled or awaiter() got cancelled? You can't... In the end both get can...