Nerd-Bait: ESP8266 + ILI9341 Screen

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.”

IMG_3830

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.

High Speed SSD1306 Library

[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.