Search found 4 matches

by Polo
Fri Jan 11, 2019 11:48 am
Forum: General Discussion and Questions
Topic: namedtuple to JSON possible?
Replies: 2
Views: 91

Re: namedtuple to JSON possible?

Yes! That works.
Thank you very much!
by Polo
Thu Jan 10, 2019 9:10 pm
Forum: General Discussion and Questions
Topic: namedtuple to JSON possible?
Replies: 2
Views: 91

namedtuple to JSON possible?

Hello everyone. I've been trying to find a good way to serialize objects, but there's always something missing in the micropython implementation. My goal is a Setting class where: - I can access parameters by name (not key lookup) - I can serialize the parameters to JSON Something that can do: objec...
by Polo
Wed Oct 03, 2018 8:05 pm
Forum: The MicroPython pyboard
Topic: heap_lock heap_unlock not working
Replies: 9
Views: 358

Re: heap_lock heap_unlock not working

The responses on the issue explain the behavior.
You can't use the console with the heap locked, and heap_unlock without a previous lock "fails".

Thanks everyone!
by Polo
Tue Oct 02, 2018 1:23 pm
Forum: The MicroPython pyboard
Topic: heap_lock heap_unlock not working
Replies: 9
Views: 358

heap_lock heap_unlock not working

New account, so no code tags, sorry When I run this code I get a MemmoryError: memory allocation failed, heap is locked import micropython micropython.alloc_emergency_exception_buf(100) micropython.heap_lock() micropython.heap_unlock() Running this also locks the heap: import micropython micropython...