Posts

Showing posts from May, 2021

Garbled OLED display

I was testing the SD1306 MicroPython library for a small OLED display I just received. It uses the I2C bus and it is 128x64 pixels monochrome. I have used a smaller one before with that library and it seemed a no-brainer.   Unfortunately, I was not sure the unit was operational as it was brand-new and could be defective. I could only see the text I sent to the display for an instant and then only a fixed garbled background that was impossible to remove. I searched away until I found a Reddit post that summarized my problem exactly: It turned out very similar displays are sold, often without the seller specifying what model is being sold. So the OLED display SH1106 was the one I received and, if you use the SD1306 library with it, you get a garbled display.  Once I reverted to the right library, everything worked as expected. As usual, I would love not to make these mistakes, but this is a reminder about the importance of making sure what part you are buying EXACTLY!! 

Thonny with the ESP32

Image
 When I presented to my students the use and features of rshell so they can use it for MicroPython development they were not impressed at all. So I started to look for a Python GUI  that could work well with a ESP32 using MicroPython. I needed a multiplatform solution and then I saw an add on Udemy about an online course by Peter Dalmaris. I saw a sample video about Thonny software where I learned there is  a set of different platforms supported by that tool, as it can be used not only for Python programming on your PC but also on several MicroPython targets, such as the ESP32, which is supported out of the box. Easy to install and set up, I was sold from minute one, as it makes it easy to have access to the ESP32 filesystem. It can even upload MicroPython to the ESP32 so students do not need to fiddle with command-line esptool.py software.  I recommend you giving Thonny a go if you are using MicroPython on an ESP32. It even includes a serial plotter function similar to the one found