create_resources(${CMAKE_CURRENT_LIST_DIR}/../../binaries/RAM_APP ${CMAKE_BINARY_DIR}/binaries.c)
set_property(SOURCE ${CMAKE_BINARY_DIR}/binaries.c PROPERTY GENERATED 1)
Or using `EMBED_FILES`I just happened to be looking at this very thing today that had to do this: https://github.com/espressif/esp-serial-flasher/blob/master/...
Many ESP32's can only do 400kHz I2C, whereas their SPI peripheral can often do 80 MHz or more (although you wouldn't want to go that fast here). 400kHz sort of works, but if you also want to handle other I2C devices it can easily become a problem.
But this is exactly the kind of thing the SPI peripheral is meant for. This cannot be said for the I2C peripheral, with its measly fast mode support.
Depending on the chip and your usecase, you might also want to use I2S for your DAC.
And yes, the audio data runs over I2S - the chip I’m using just uses I2C for control.
Plus not needing to dedicate a control pin per device added to the bus. Though of course if data throughout is an issue SPI is better than I2C.
When used with those kits, you'd use the QWIIC/whatever connector for all the sensors and other low-bandwidth things like I2C is meant for, while the display would be connected with SPI.
(I2C isn't more plug and play than SPI though, and a preterminated plug shouldn't be a big deal.)
There's a few Rust libraries for it, too. And it's supported in Wokwi! https://wokwi.com/projects/425067706980448257
Getting up and running with lvgl was honestly kind of brutal, but now that it's done, I am generally happy with it. As you determined, it's much more of a UI toolkit than u8g2; the sort of thing designed with fancy thermostats and smart watches in mind. u8g2 has a menu toolkit but it is pretty narrow in scope.
I am planning on releasing a bare bones IDF-SDK v5.4 + lvgl 9.x + SSD1327 starter project soon so that I can hopefully save future travelers some pain.
I wish they were available in slightly larger models-- even if it's only 128x64, there are plenty of spots where a 5-8cm display would be more legible than the 3cm or less ones that are common,
I normally work with C++ on esp32 for these little displays, and in there I use a screen buffer for partial refreshes which makes them very fast !!
One of my favorite hacks is running this display over HDMI [0].
Note that it’s possible to refresh it at higher rates by using partial refreshes. Or even higher to 150 fps [1].
[0] https://hackaday.com/2022/04/01/making-your-own-technically-...
[1] https://hackaday.com/2018/05/08/push-it-to-the-limit-ssd1306...
I used one to display network statistic on my homelab server, after a year, many pixels is supper dim. They are clearly burned in. I think the display is not meant to be used for long time, but rather for short time. Meanwhile i have seen 16x2 lcd being used for over decade without issue
I was actually surprised / disappointed by the poor quality of the drivers out there. If you instrument and log the bytes u8g2 sends to the device and how the buffer is sent, you see it’s pretty messy, inefficient and hacky. Seems like everyone copy+pasting everyone else’s code, without understanding fully.
So in the end I just decided to draw into a local buffer and then send that buffer in one single transaction to the display.
Once you figure out the data sheet it’s actually very easy to program these displays. For example, to test any SSDxxxx display, you need to send all of two bytes: 0xaf (display on), 0xa5 (all pixels on)
I am now looking at SSD1322, which is both grayscale and has enough internal RAM for two buffers for even smoother drawing (write into a non-displayed region of the RAM and then change the display offset)
SSD1322 looks great and might be something I look at for the future..
[espressif32] ; PLATFORM
platform = espressif32
board_build.embed_txtfiles = folder/file.ext ; embed null-terminated file(s)
Also have a look at https://docs.platformio.org/en/latest/platforms/espressif32.....I do like lvgl when I get it going, but the way it forces a structure on the code is not to my linking. Every time I start a new project I get annoyed until I get it working.
Love it.