Search found 8 matches

by Ricardo
Mon Jun 22, 2020 9:46 pm
Forum: General Discussion and Questions
Topic: "Empty" TypeError
Replies: 5
Views: 337

Re: "Empty" TypeError

SpotlightKid wrote:
Mon Jun 22, 2020 9:33 pm
You can always delegate instead of inheriting:
True! It is a bigger workaround, though, but one to keep in mind. Thanks!
by Ricardo
Mon Jun 22, 2020 9:10 pm
Forum: General Discussion and Questions
Topic: "Empty" TypeError
Replies: 5
Views: 337

Re: "Empty" TypeError

Looks like you've hit the target! Thanks, Christian!
by Ricardo
Mon Jun 22, 2020 6:46 pm
Forum: General Discussion and Questions
Topic: "Empty" TypeError
Replies: 5
Views: 337

Re: "Empty" TypeError

Oddly enough, this code works on MicroPython:

Code: Select all

class Cfg(dict):
    pass

cfg = Cfg()
cfg.update({"rate": 30})
print(cfg)
The result is, as expected:

Code: Select all

{'rate': 30}
Now I'm using something like this as a workaround, but I wonder if this issue is a bug in MicroPython...
by Ricardo
Mon Jun 22, 2020 4:10 pm
Forum: General Discussion and Questions
Topic: "Empty" TypeError
Replies: 5
Views: 337

"Empty" TypeError

Hi there! The code below runs fine on CPython (versions 2.7.16, 3.4.10, 3.7.0, ...), but produces a "TypeError" on MicroPython (ESP32 firmware esp32-idf3-20200618-unstable-v1.12-554-gce02d5e34): class Cfg(dict): def __init__(self, default={}): self.update(default) cfg = Cfg(default={"rate": 30}) pri...
by Ricardo
Thu Jun 18, 2020 5:39 pm
Forum: General Discussion and Questions
Topic: littlefs - advantages & disadvantages
Replies: 32
Views: 5362

Re: littlefs - advantages & disadvantages

I lost my LittleFS partition. It seems it isn't resilient to power failure after all, at least on the ESP32 with firmware esp32-idf3-20200509-unstable-v1.12-447-gab4e19770. Everything was working fine for a few days, including powering the system up and down several times. Today I disconnected the p...
by Ricardo
Tue Apr 21, 2020 8:42 pm
Forum: General Discussion and Questions
Topic: Flash file system best practices (or: how to not destroy the flash / NVS by logging data)
Replies: 4
Views: 530

Flash file system best practices (or: how to not destroy the flash / NVS by logging data)

Hi! I'm about to write a simple humidity / temperature logger using an ESP32. Sensor data will be collected at least once per minute, and the device should run 24/7, for several days, powered by a phone charger. There is no Wi-Fi nearby most of the time, so I have to store data at least momentarily ...
by Ricardo
Sun Dec 15, 2019 2:22 am
Forum: ESP8266 boards
Topic: Determine flash size on your module
Replies: 14
Views: 24705

Re: Determine flash size on your module

Hello, MicroPython World! :D Sorry to bump such an old thread, but I'd like to share some information that could be helpful to others. As a complete newbie, I wanted to find out how much flash my modules have to know if I could use MicroPython on them - but I received no manual, specs or any kind of...