a correction to: adafruit esp32 feather v2

In the last post I wrote that you could flash this Adafruit Feather with a version of MicroPython. Unfortunately it did not enable the use of the board’s SPIRAM. The specifications for this board declares that it has 4MiB of non-volatile (FLASH) and 2MiB of RAM (SPIRAM). When I went to check for the amount of free RAM it was far lower than I expected. That’s when I realized I’d use the wrong MicroPython image to flash the Feather. The correct link is: https://micropython.org/download/esp32spiram/ .

One way to test that you are seeing all the RAM is by adding two lines to the blink code, starting at line 13.

import esp
print("Flash size {} in bytes".format(esp.flash_size()))
import gc
print("Memory free {} in bytes.".format(gc.mem_free()))

When the code executes you’ll see the following (I’m working with Thonny, and this is in Thonny’s shell):

MPY: soft reboot
esp32, esp32, 1.18.0, v1.18 on 2022-01-17, ESP32 module (spiram) with ESP32
Flash size 4194304 in bytes
Memory free 2046144 in bytes.

Note the second line that contains “…ESP32 module (spiram)…”, and the last line that shows 2MiB of RAM memory.

adafruit esp32 feather v2

Figure 1: Adafruit ESP32 Feather V2 (image via Adafruit)

I ordered yet another ESP32 based board to experiment with. The latest in my collection is the Adafruit ESP32 Feather V2. You can learn quite a bit here: https://learn.adafruit.com/adafruit-esp32-feather-v2 . I have it programmed with the standard MicroPython v1.18 release from here: https://micropython.org/download/esp32/ . By the way, when you read the instructions on that page on how to program the Feather, you want to use the latest official release which is currently 17 January 2022, or esp32-20220117-v1.18.bin. The directions are correct, just make sure to use the most current MicroPython version.

I’m happy to have this board, as it’s the only board that I have the official MicroPython (v1.18) release running on. All my other ESP32 boards require a nightly to run, including Adafruit’s own QT Py ESP32-C3 board, which I touched on in an earlier post.

Because there are no common “magic” names for the NeoPixel pin, I’ve had to resort to testing what ESP board I’m running on and setting up the pin number accordingly. For the ESP32 Huzzah, I’ve also had to do a bit more work, specifically turning power on to the NeoPixel. This is covered in the Adafruit documentation linked to above. The section for handling the Huzzah’s NeoPixel sets the right pin to communicate with the NeoPixel as well as enable the power for the NeoPixel. And if you read the Adafruit documentation, you’re going to have to turn on the power pin if you want to use the I2C bus. The NeoPixel and I2C bus are both powered from the same pin so that if you need to shut down completely, you can do so programmatically before going into very deep sleep.

One other observation about this board. Adafruit says that the new USB adapter chip requires a driver for macOS. I’ve tried this on an M1 MacBook Pro with Monterey 12.4 and it shows up just fine. So if you have a contemporary Mac with any version of Monterey (which at least may include Big Sur, version 11) DO NOT install that driver they offer. I can’t speak to Windows, but I’d be very surprised if Windows 10 needs a driver. If you get one of these boards, plug it in and look to see if it comes up first before blindly installing any software drivers.