Search found 8 matches

by JoeCharlieH
Thu Jul 02, 2020 5:04 pm
Forum: General Discussion and Questions
Topic: Season of Docs : MicroPython
Replies: 23
Views: 2050

Re: Season of Docs : MicroPython

IE the argument names, the argument types, the return type, and a doc comment. The approach I'm taking in generating my stubs is to scrape the MicroPython documentation rst files and generate the stubs (typeshed) from these. It's an excellent idea creating stubs from the documentation instead of th...
by JoeCharlieH
Mon Jan 20, 2020 5:58 pm
Forum: General Discussion and Questions
Topic: Handling usocket errors
Replies: 0
Views: 529

Handling usocket errors

While debugging a simple MQTT client device, I've encounter many headaches trying to catch the specific error that stopped the execution of my main program. After many attempts (and reading the usockets documentation and the lwip.c module), I learned the hard way that you need to sacrifice "Knowing ...
by JoeCharlieH
Thu Sep 26, 2019 11:48 pm
Forum: ESP8266 boards
Topic: Does <network.wlan>.connect() with no args performs a write operation to the flash?
Replies: 1
Views: 404

Does <network.wlan>.connect() with no args performs a write operation to the flash?

Hi, I've been working on some remote room temperature sensing with a battery powered ESP8266. So, I've already read all the related topics about storing Wi-Fi credentials and Flash wearing out. My question is, does issuing <network.wlan>.connect() without the ssid and password performs a write to th...
by JoeCharlieH
Sun Sep 01, 2019 10:37 pm
Forum: General Discussion and Questions
Topic: Simple scenario with button/IRQ/write to file that leads to ESP crash + FS coruption
Replies: 6
Views: 877

Re: Simple scenario with button/IRQ/write to file that leads to ESP crash + FS coruption

Well, beside the response above, you shouldn't do write operations inside an IRQ. What I usually do is to change a variable inside the IRQ and check if it is True or False inside your main loop: write_flag = False def irqHandler(pin): global write_flag write_flag = True def sch(): d = utime.localtim...
by JoeCharlieH
Fri May 31, 2019 6:01 pm
Forum: General Discussion and Questions
Topic: New MicroPython release: v1.11
Replies: 7
Views: 1792

Re: New MicroPython release: v1.11

I'm really happy that they added the I2C.writevto(addr,vect) method and that it's already used in the ssd1306 driver :D :D :D :D
by JoeCharlieH
Mon May 13, 2019 4:52 pm
Forum: General Discussion and Questions
Topic: Custom Smaller Fonts for SSD1306
Replies: 3
Views: 760

Re: Custom Smaller Fonts for SSD1306

Thanks for both of your suggestions :D I'll try both of them and choose the one that is more interesting and "fun" to work. :lol: :lol: :lol: Here is an example of what I'm trying to do: https://i.ibb.co/gMxvx3M/graph-example.png (The low resolution is just for this example. In my project I'm using ...
by JoeCharlieH
Fri May 10, 2019 8:06 pm
Forum: General Discussion and Questions
Topic: Custom Smaller Fonts for SSD1306
Replies: 3
Views: 760

Custom Smaller Fonts for SSD1306

Hi all: I'm currently working in an UI for a glucose sensor, so I need to display the collected data in a small graph (e.g bars, points in time, etc) with an 128x64 display. I have no issues using the frambuf and ssd1306 modules to create simple lines and shapes in the display, but using smaller fon...
by JoeCharlieH
Mon Apr 22, 2019 10:17 pm
Forum: ESP8266 boards
Topic: Is wifi.persistent implemented?
Replies: 10
Views: 2650

Re: Is wifi.persistent implemented?

So, the main workaround to avoid writing WIFI creds to flash is waiting for a couple of seconds (e.g. sleep_ms(500)) at the start of the boot.py file and after that check if the ESP8266 is connected to the last successful AP. My question is, if the connection fails due to wrong creds or the stored A...