The ESP32 is the successor to the wildly popular ESP8266. There seems to be no end to what the chips can do. However, despite all the wireless communication capabilities, the module doesn’t have a display. [G6EJD] wanted to connect an ILI9341 TFT display and he put the code and information on GitHub. You can also see a video of his work, below.
Since the display uses a serial interface, there isn’t much wiring required. The Adafruit GFX library does the heavy lifting, utilizing the SPI library for the actual communications. The first demo shown on the hardware can pull weather data decoded. If you want more details on the display’s operation, check out [G6EJD’s] YouTube channel and you’ll find other videos that go into more detail.
We’ve seen these displays married to an ESP8266 with an integrated PCB, too. There’s a choice of libraries, and perhaps we’ll see a similar range of choice for the ESP32.
Continue reading “ESP32 Display is Worth a Thousand Words”
Reader [Jasper] writes in with glowing praise for the TFT_eSPI library for the ESP8266 and the various cheap 480×320 TFT displays (ILI9341, ILI9163, ST7735, S6D02A1, etc.) that support SPI mode. It’s a drop-in replacement for the Adafruit GFX and driver libraries, so you don’t need to rework your code to take advantage of it. If you’re looking to drive an LCD screen with an ESP8266 and Arduino, check this out for sure.
As a testbed, [Jasper] ported his Tick Tock Timer project over to the new library. He got a sevenfold increase in draw speed, going from 500 ms to 76 ms. That’s the difference between a refresh that’s visibly slow, and one that looks like it happens instantly. Sweet.
Improving software infrastructure isn’t one of the sexiest or most visible hacks, but it can touch the lives of many hackers. How many projects have we featured with an ESP8266 and a screen? Thanks, [Bodmer] for the good work, and [Jasper] for bringing it to our attention.
In honor of my-own-damn-self, we’re going to call it Elliot’s Law: “When any two interesting parts get cheap enough on eBay, someone will make an interface PCB for them.”
And so it is with [Johan Kanflo]’s latest bit of work: a PCB that mounts an ESP8266 module onto the back of an ILI9341 color display, with user button, power supply, and an auxiliary MOSFET. Four bucks for the screen, four bucks for the ESP8266 module, and a few bucks here and there on parts and PCB, and you’ve got an Internet-enabled, full-color, 320×240 graphical display. That’s pretty awesome, and it’s entirely consistent with Elliot’s Law.
However, we almost can’t forgive [Johan] for the extreme geek-baiting. Posting the cuuuute little screen next to a Stormtrooper Lego figure is already hitting below the belt, but displaying a Commodore-64 startup screen, in what’s got to be exactly the right font and color combo, borders on being pathologically emotionally manipulative. You’re playing with our hearts, [Kanflo]!
We love projects like his ESP8266-and-RFM69 mashup and his gutted-Macintosh-planespotter-gizmo, so we’re inclined to forgive. And besides, we’re still on a high from naming our first law and we’re wondering which two eBay parts are up next.
[Lewin] wrote in to tell us about a high speed library for Arduino Due that he helped develop which allows interfacing OLED displays that use the SSD1306 display controller, using DMA routines for faster display refresh time.
Typically, displays such as the Monochrome 1.3″ 128×64 OLED graphic display , are interfaced with an Arduino board via the SPI or I2C bus. The Adafruit_SSD1306 library written by [Limor Fried] makes it simple to use these displays with a variety of Arduinos, using either software or hardware SPI. With standard settings using hardware SPI, calls to display() take about 2ms on the Due.
[Lewin] wanted to make it faster, and the SAM3X8E on the Due seemed like it could deliver. He first did a search to find out if this was already done, but came up blank. He did find [Marek Buriak]’s library for ILI9341-based TFT screens. [Marek] used code from [William Greiman], who developed SD card libraries for the Arduino. [William] had taken advantage of the SAM3X8E’s DMA capabilities to enable faster SD card transfers, and [Marek] then adapted this code to allow faster writes to ILI9341-based screens. All [Lewin] had to do was to find the code that sent a buffer out over SPI using DMA in Marek’s code, and adapt that to the Adafruit library for the SSD1306.
There is a caveat though: using this library will likely cause trouble if you are also using SPI to interface to other hardware, since the regular SPI.h library will no longer work in tandem with [Lewin]’s library. He offers some tips on how to overcome these issues, and would welcome any feedback or testing to help improve the code. The speed improvement is substantial. Up to 4 times quicker using standard SPI clock, or 8 times if you increase SPI clock speed. The code is available on his Github repo.