Makertober Day 7: Led Array
/
I’m totally sold on Python development for embedded devices now. I had an idea for a silly device and ordered an 8x32 led array powered by Max2179 devices. The leds arrived last night and I plugged them into one of my cheap ESP32 devices and got it sort of working. I found an Arduino library and, after tweaking the C++ library code I manged to make it build and almost display something. Writing and deploying C++ from the Arduino IDE again reminded me why I don’t like this very much anymore. The compilers are very brittle and prone to failing if you happen to use a library that contains code that is not supported by the device you are targeting . And deployment is tiresome and slow. I think that the Arduino toolchain is an awesome achievement and makes lots of lovely things possible but it can be a bit of a pain to use sometimes.
Rather than continue with that I thought that today I’d try using putting MicroPython on the ESP32 and using a Max2179 library that I found on GitHub. This. Just. Worked. I used Thony to write and deploy the code. I was able to use the REPL command prompt to test out the code and my tiny little programs took no time at all to deploy and run inside the device. Best of all, the Max2179 library I found just sits on top of the Framebufuffer (http://docs.micropython.org/en/latest/library/framebuf.html) class and has lots of easy to use graphics commands.
I’ve got text scrolling nicely and now I’m going to hook it up to a data source. If you want to have a go at this kind of thing I’ve written a little HowTo that you can find here.