Search found 969 matches
- Tue Jul 27, 2021 6:56 am
- Forum: ESP8266 boards
- Topic: Increase ROM size
- Replies: 6
- Views: 4768
Re: Increase ROM size
Check these files for my custom 1MB firmware: https://github.com/kevinkk525/pysmartno ... artnode_1M
- Tue Jul 20, 2021 5:00 am
- Forum: Programs, Libraries and Tools
- Topic: uasyncio - determining if a function is a coroutine
- Replies: 12
- Views: 5575
Re: uasyncio - determining if a function is a coroutine
ok thanks for the info. The current uasyncio implementation is CPython compatible almost everywhere because this time it was a basic requirement to be CPython compatible. But it does not distinguish between a coroutine and a generator. But from the top of my head I can't think of how someone would a...
- Mon Jul 19, 2021 7:30 am
- Forum: Programs, Libraries and Tools
- Topic: uasyncio - determining if a function is a coroutine
- Replies: 12
- Views: 5575
Re: uasyncio - determining if a function is a coroutine
lol ok.. interesting. Why didn't they just use the "official" uasyncio module? .. (sorry I know you're not the right person for this question)
- Mon Jul 19, 2021 4:45 am
- Forum: Programs, Libraries and Tools
- Topic: uasyncio - determining if a function is a coroutine
- Replies: 12
- Views: 5575
Re: uasyncio - determining if a function is a coroutine
CircuitPython has no asyncio support afaik, why would they need a distinction between coroutines and generators?
- Sun Jul 18, 2021 8:08 am
- Forum: Programs, Libraries and Tools
- Topic: uasyncio - determining if a function is a coroutine
- Replies: 12
- Views: 5575
Re: uasyncio - determining if a function is a coroutine
I don't know a better way either. It's probably not easy because of the changes to keep everything "micro".
- Sat Jul 17, 2021 3:39 pm
- Forum: Programs, Libraries and Tools
- Topic: uasyncio - determining if a function is a coroutine
- Replies: 12
- Views: 5575
Re: uasyncio - determining if a function is a coroutine
The difference is that Christian's approach doesn't execute the function and purely inspects it "untouched", while pythoncoder's approach executes the function and then checks if the returned type is an active generator function which can be passed to uasyncio.create_task(). Pythoncoder's approach i...
- Sat Jul 17, 2021 4:56 am
- Forum: Programs, Libraries and Tools
- Topic: Porting a library from Circuitpython
- Replies: 7
- Views: 3236
Re: Porting a library from Circuitpython
You are missing an __init__.py in both the root and the ht16k33 directory. Then it should work.
(btw, if it works in CPython, it'll work in micropython)
(btw, if it works in CPython, it'll work in micropython)
- Thu Jul 15, 2021 5:09 am
- Forum: General Discussion and Questions
- Topic: Is it good practice to keep calling `del` on objects that I don't need anymore?
- Replies: 8
- Views: 2929
Re: Is it good practice to keep calling `del` on objects that I don't need anymore?
In my project I import multiple modules. After each import statement I call gc.collect() to free all the RAM that only was only temporarily used during import. Then I call gc.collect() after creating bigger objects. This ensures that the RAM is as continuously used as possible and the fragmentation ...
- Wed Jul 14, 2021 9:16 pm
- Forum: General Discussion and Questions
- Topic: Is it good practice to keep calling `del` on objects that I don't need anymore?
- Replies: 8
- Views: 2929
Re: Is it good practice to keep calling `del` on objects that I don't need anymore?
I only use "del" in long running loops which occasionally create large temporary data structures. (Afterwards I call gc.collect() to free that RAM). That way those variables don't take up unneccessary RAM. Simple, yet weird example: while True: a={} a.update(await get_results()) await asyncio.sleep(...
- Sat Jul 03, 2021 12:12 pm
- Forum: General Discussion and Questions
- Topic: WebREPL freezes when pasting large code block
- Replies: 6
- Views: 2611
Re: WebREPL freezes when pasting large code block
Might also be due to socket operations in webrepl making it slower, more complex and more resource hungry?