step 1 is complete

ESP32-S3-DevKitC w/MAX2719 and 1088AS LED 8×8 Matrix

The first step in my plan for world conquest having an ESP32-S3-DevKit1 communicate with a MAX7219 is complete. All it took was five wires, two of which supplied power, and a little bit of MicroPython code running on the latest MicroPython release, and I was able to send text to my inexpensive four character matrix display I purchased on Amazon.

ESP32-S3-DevKit1 w/MAX7219

The code depends upon a library I found on GitHub (see links section below). Here’s the test code sample I wrote;

# Enable SPI and clear the display, which turns off all LEDs.#import max7219from machine import Pin, SPIimport timespi = SPI(1, 10000000, sck=Pin(12), mosi=Pin(11))cs = Pin(10, Pin.OUT)display=max7219.Matrix8x8(spi, cs, 4)display.fill(0)display.show()time.sleep_ms(500)# Probe the MicroPython/ESP32-S3-DevKit1 environment.#import gcprint(f"  MEM: {gc.mem_free():,} MB")import espprint(f"FLASH: {esp.flash_size():,} MB")import platformprint(f" PLAT: {platform.platform()}")import osUNAME = os.uname()[-1].split(' ')[-1]import binasciiimport machineUNIQUE_ID = binascii.hexlify(machine.unique_id()).decode('ascii').upper()print(f"  UID: {UNIQUE_ID}")SSID = UNAME + '-' + UNIQUE_ID[-4:]print(f" SSID: {SSID}")# Display text on the four 8x8 matrix displays.#display.text(UNIQUE_ID[-4:],0,0,1)display.show()

I’m using Thonny 4.1.4 to program the ESP32-S3. Here’s the output from boot.py in Thonny’s console when it’s run;

  MEM: 8,310,688 MBFLASH: 8,388,608 MB PLAT: MicroPython-1.22.1-xtensa-IDFv5.0.4-with-newlib4.1.0  UID: 7CDFA1E3C534 SSID: ESP32S3-C534

The four characters on the 8×8 displays are the last four characters of the UID. It’s a better “proof of life” than something random. To get the code listing to run, you need to download the single GitHub file from the link below, move it onto the ESP32-S3 controller, and then import it to begin to use the 1088AS displays.

Step 2 is to get Bluetooth operational on the ESP32-S3.

Links

MicroPython MAX7219 8×8 LED Matrix library — https://github.com/mcauser/micropython-max7219

designing the esp32-s3/max7219 device

a rant about raspberry pi os

 

The Raspberry Pi OS desktop

I’m still trying to love Raspberry Pi OS and its LXDE-based window manager, and it’s just not happening. I’ve tweaked some things, even going so far as to pull a screen wallpaper from Linux Mint Uma (mikeu_red_waves.jpg); that seems to make the overall desktop experience a bit better for me.

I tried lxappearance to change the desktop. That application opened but I couldn’t change anything.

I then switched from Firefox as my default browser to Chromium because in spite of what was claimed, Firefox is still a hot mess and slower on Raspberry Pi OS than Chromium. I found Chromium a better browser experience than Firefox; Chromium is now my default browser.

That desktop screen capture you see above was taken with grim, a command line tool that is absolutely primitive to use and the only screen capture tool I found that worked. No other screen capture application will work because of the shift from X to Wayland. Basically it’s an all or nothing type of tool. If you want a specific section of the desktop, then you edit the full screen capture with another primitive graphics editing tool to whittle away the extraneous parts. For this post the full desktop was sufficient and required no further post processing.

After flipping back to Raspberry Pi OS and regretting the decision almost immediately, my intent is now to flop back to Ubuntu 23.10. For anything needing SPI support I’m going to move it over to one of my numerous microcontroller boards, such as one of the ESP32-S3 development boards. I can either code something in C++, or drop MicroPython on it. There’s a certain irony in doing a write/port to MicroPython as it won’t work with regular Python 3 under Ubuntu 23.10. But everything else works, and I might even cobble something together to use Bluetooth to communicate from the Raspberry Pi 5 to the ESP32-S3 hosting the MAX7219/1088AS displays. That sounds a lot more productive and a lot less frustrating than trying to beat Raspberry Pi OS into shape.

Yep. That’s my plan.