My new ESP32 is bricked?

Posted on śro 17 kwietnia 2019 in micropython • Tagged with IoT, micropython, python, tipsNtricks

TL;DR: press 'boot' button when flashing ESP32. At least some of them.

I have connected newly bought ESP32 to usb cable and try to flash it with micropython image.

(micro) maho@dlaptop:~$ esptool.py --port=/dev/ttyUSB0 erase_flash
esptool.py v2.6
Serial port /dev/ttyUSB0
Connecting........_____....._____ …

Continue reading

Micropython fork wars

Posted on ptk 05 kwietnia 2019 in micropython • Tagged with IoT, micropython, python

If you ecounter following problem:

    TypeError: function takes 2 positional arguments but 3 were given

while trying to use uasyncio and micropython - then to save your time, learn a bit about current situation in project:

There is fork war between Micropython and former Micropython developer - Pfalcon which started fork of …


Continue reading

Queryset repr trick

Posted on czw 15 lutego 2018 in misc • Tagged with tipsNtricks, python

Sometimes, when I'm debugging something using pudb (probably it affects any interactive debugger), pudb is reflecting value of variables of QuerySet type, which makes unneccesary query to database. It makes debugging slow, and sometimes it breaks debugging context because of making changes in db.

To avoid that, add following code …


Continue reading