Smart displays come in all kinds of shapes and sizes, and some of the most interesting that I've seen have been the circular rotary displays made by countless companies. These are circular displays with a ring around them that can turn in order to send a signal, and the display itself is a button, too. Elecrow has now launched two different displays in this category: the Elecrow CrowPanel 2.1-inch display and the CrowPanel 1.28-inch display, both with touch support. They're a pretty neat set of devices, both based on the ESP32, and I've particularly spent a lot of time with the smaller of the two.

Before getting into it, the code that I'll make available does not yield a fully working display on the 2.1-inch model. I ran into issues with color on it, though I was able to get every other aspect of it working in both PlatformIO and ESPHome. For the 1.28-inch display, I was able to get it fully working in both ESPHome and with PlatformIO. Both PlatformIO examples use LVGL 9.3, which is an upgrade over the included LVGL 8.4.0 sample from Elecrow, too.

If you're looking to buy either of these devices, they come in at $29 and $36 for the 1.28-inch and 2.1-inch displays, respectively. That price difference may not seem like much for a big size increase, but the 1.28-inch display packs some nice little extras, too.

Elecrow 1.28-inch Rotary Display

Elecrow's 1.28-inch rotary display features UART, I2C, and FPC, with a 240x240 IPS display and an ESP32-S3-N16R8.

Elecrow 2.1-inch Rotary Display

Elecrow's 2.1-inch rotary display features UART, I2C, and FPC, with a 480x480 IPS display and an ESP32S3-N16R8.

Building a smart clock with a rotary display

And ESPHome, of course

Before getting into the software details, we'll go over the hardware, first. The Elecrow 1.28-inch display is my favorite of the two, and it's thanks to the hardware and stellar build quality. You get a USB to UART output (over micro JST MX 4P), an I2C interface, and an FPC connector, alongside five RGB LEDs (controlled via the WS2812 or equivalent chipset), and the star of the show, the 240x240 1.28-inch IPS display. It's made of a combination of aluminum, glass, and plastic, and it feels extremely premium. It's a "finished product" in the sense that the case that it's in makes it so that you could use it as is, without ever needing to mount it to a wall for it to feel like a device you can start using right away. Finally, it's all powered by an ESP32-S3-N16R8.

As already mentioned, I have ESPHome and PlatformIO code samples for both of these devices, and the ESPHome example in this case turns it into a smart clock that pulls the current time, date, and day of the week from Home Assistant. The rotary encoder works perfectly and reports the data to Home Assistant, and you can press down on the display to toggle a button. As well, there's an LED strip built in to the hardware that you can control, and I have it working in ESPHome, complete with custom colors and effects. It just looks good, and would look even better mounted on a wall as a smart thermostat, volume controller, or whatever you can put your mind to.

That's the thing with displays like these, too: there are obvious use cases, like thermostats, which are what the bulk of people probably think of when they see one of these. Yet a thermostat isn't really all too common in Ireland, so a clock just made sense, to be honest. It's an easy way to demonstrate that it works, and the input data from the rotary dial can be used for a lot of different things. With the GoXLR integration in Home Assistant, I was able to use it to control the volume level of my PC, but you could use it to control a Bluetooth speaker's audio, the light level of a smart light, or whatever you want.

For example, you could add multiple pages using LVGL and each page is dedicated to something else. Swipe to move between them, then use the button as a binary toggle, or the rotation of the dial to turn whatever it is up or down. The RGB can be used as feedback when the task has been completed (or has failed) or could be used for notifications to draw your attention towards it and look at the display. My implementation incorporates every aspect of the hardware, and can be copy and pasted over to ESPHome for immediate use. All of the hardware used here is readily supported by ESPHome.

For those who'd prefer to use Arduino IDE or PlatformIO, it's just as easy. Elecrow's sample code worked well here, and formed the basis of my LVGL 9.3 deployment and testing. Once I had a working PlatformIO build up and running, I begun porting my working configuration to ESPHome.

As for why I built it in PlatformIO first before porting it, the reason is that Elecrow's samples are somewhat complicated. The company has an auxilary OLED display included in the example, meaning that you're trying to decipher the initialization and control of two displays in the one sample, rather than two separate samples. By building my own PlatformIO sample first, it made it simpler to untangle it all and figure out what was actually necessary for the device by itself as it was porting from C++ to C++, rather than C++ to YAML.

The Elecrow 2.1-inch screen proved harder to work with

Close but no cigar

The Elecrow 2.1-inch display is a simpler device, aimed more at makers looking to make it a part of an overall product or for mounting on a wall rather than using as an individual device on its own. You get the same connectors as you do in the smaller variant, with a USB to UART output (over micro JST MX 4P), an I2C interface, and an FPC connector, though you lose the RGB and the more premium-feeling casing. Here you get a 480x480 2.1-inch IPS display as well, with three M3 screw holes on the back for mounting. Finally, it's all powered by an ESP32-S3-N16R8, just like the 1.28-inch variant.

Unfortunately, I ran into numerous issues getting this display to initialize correctly, and that's down to the ST7701 display that it uses. It's a notoriously finicky display controller, requiring precise timings and a correct sequence of commands in order to initialize correctly. Companies using these display controllers (such as in the case of Adafruit) often don't fully know what these command sequences actually do or what they mean, as the manufacturer is the one who supplies it, not Elecrow. I was able to pull the initialization sequence from Elecrow's sample code and convert it to a custom initialization sequence in ESPHome, which did yield a display that turned on, but the colours were displayed incorrectly.

Porting LVGL 9.3 and combining it with Elecrow's sample code didn't give me much better results, either. While I did get the display to initialize in the same way that I had with the 1.28-inch display, three discolored lines appear in vertical strips on the screen. At this point, I was unsure how to proceed. I also don't believe it's as a result of my attempts at initialization, either, as typically the only way you'd actually damage a display like this is via one of the following:

  • Supplying wrong voltages to the screen
  • Miswiring ground and VCC
  • Applying incorrect LED backlight current
  • Shorting power pins or display lines

However, all of these would typically occur while physically modifying the device, which I didn't. Regardless, I'm hopeful that my code can serve as a blueprint to help others get theirs initialized and working, too. The ST7701, in particular, appears to be a rather mystical display, and different vendors are all doing their own thing in order to initialize it. Elecrow recommends using their library, which I did in order to rule out as many potential causes as I could, but newer versions of the Arduino GFX library instead use the ESP32RGBPanel header for instantiating the ST7701. From looking at ESPHome's mipi_rgb display driver, though, it seems that ESPHome's implementation should be more or less the same as what newer versions of the Arduino GFX library do, as both use the esp_lcd_panel_rgb library, and both simply serve as an abstraction from the esp-idf SDK under the hood.

Devices like these are what you make of them

They can be whatever you want them to be

When it comes to building your own hardware and software like this, what you put into it is what you get. It can be hard to get started, especially when they're new devices, which is why I put the time into figuring out how to make them work and building out proper examples in both PlatformIO and ESPHome. I'm disappointed I couldn't get the 2.1-inch display working fully, but I'm hopeful that I'll be able to work it out and use it in the same way I've been able to use the 1.28-inch display here.

Either way, they're both really nice pieces of hardware, though clearly aimed at different people. If you want to truly own your creation, then the 2.1-inch display is perfect with its mounting screws and "open" build for expansion. Otherwise, if you just want something that works, then the 1.28-inch screen is right there. And honestly, I think most people will prefer what essentially amounts to a finished device.

If you want to use the code that I used to build these, it's over on my GitHub with both my PlatformIO and ESPHome samples.