John L Errington MSc

Experiments with an Arduino microcontroller

Using an ESP-WROOM-32 Devkit with a KMR-1.8 SPI display

Adding the 1.8 inch TFT display

The next stage was to attach the ST7735S based 1.8inch 128*160 px TFT display.


KMR-1.8 SPI display

KMR-1.8 SPI displayThis display has 16 pins and an SD card holder on the rear.

There seem to be many versions of this board, denoted (partly) by the colour of the tab on the screen protector.

Power connections: The display works fine with Vcc and LED+ connected to the 3.3V regulated supply from the ESP32 board. The LED- adn GND are common.

SD card: SPI interface connections SD_CS, MOSI, MISO, SCK.

Display: SPI interface uses RESET, A0 (RS), SDA (MOSI), SCL, CS


Connecting and using the KMR-1.8 SPI display

After much trial and error I found these instructions that gave me the following connections:

However the first test showed the display was only working at 128*128.

I needed to install this library from Bodmer; then edit the User_Setup.h file (I found it in sketchbook/libraries/TFT_ESPI ) to match my display and the connections used.

This User_Setup.h works fine;
except that in the UTFT_DEMO_FAST Example the final screen (orange rectangle on blue background) no text was displayed.

Also RLE_font test displayed only limited fonts until I discovered I needed to edit user_Setup.h again to enable (#define) extra fonts.

Running directly from the GPIO32 pin (pin 7) the display LED draws 11mA.
Adding a series 100 ohm resistor as shown drops the consumption to 4mA.

I wrote a sketch to demonstrate the following:

  • functions that print data to the screen, and ..
  • control the size colour and background;
  • Configure a digital output and write a value to it;
  • Configure a digital output for pwm and ..
  • write values to control the screen brightness.
  • Configure an analog input and ..
  • read a value to be displayed
  • document the functions that manage text data on screen


You can get the sketch here



Testing the ESP32 DEVKIT

The Examples folder had a whole lot of new examples: I tried the Time and WiFI scan examples, they worked fine. The WiFi access point example let me turn an LED on & off, controlled remotely from a browser on my tablet; also I was able to add a switch to turn the AP on or off so I could use it to test a nodeMCU set up to connect to it.