ESP32 with Built-In Display - the TTGO ESP32 TS v1.2
This little board has caused me no end of googling because the documentation is, well, aliexpress quality. But for the price it is great value.
I ordered on May 25th and it arrived today, June 13th. Not bad!
TTGO ESP32 TS v1.2 Bluetooth wifi module MPU9250 1.4 1.8 TFT MicroSD card slot speakers development board
So how is it?
The ESP32 is a great microcontroller, and this display ads a nice convenient feature once you get it working.
While not the fastest, it is capable of pretty good refresh rates using the C++ libraries:
I didn't realize until it arrived that it was colour - I had it confused with a monochrome screen, so that was a nice surprise :)
The display features 3x buttons (a reset button is underneath).
Pretty good package for $15, right?
Would it suprise you that it includes an MPU9250 inertial measurement unit? :D
It also has a speaker and MicroSD card slot!
Arduino Code
#include <Adafruit_GFX.h> // Core graphics library
#include <Adafruit_ST7735.h> // Hardware-specific library
#include <SPI.h>
#define TFT_CS 16
#define TFT_RST 9
#define TFT_DC 17
#define TFT_SCLK 5
#define TFT_MOSI 23
Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS, TFT_DC, TFT_MOSI, TFT_SCLK, TFT_RST);
void setup(void) {
Serial.begin(115200);
Serial.print("Hello World, Hello ST7735");
// initialize the ST7735S
tft.initR(INITR_BLACKTAB);
Serial.println("Initializing ...");
uint16_t time = millis();
tft.fillScreen(ST7735_BLACK);
time = millis() - time;
Serial.println(time, DEC);
delay(500);
tft.fillScreen(ST7735_BLACK);
}
void loop() {
tft.setCursor(0, 0);
tft.setTextColor(ST7735_RED);
tft.setTextWrap(true);
tft.print("Hello World!");
delay(500);
tft.fillScreen(ST7735_BLACK);
delay(500);
}
MicroPython Code
(You will need the ESP32 MicroPython from here
TFT_CS = 16
TFT_RST = 9
TFT_DC = 17
TFT_SCLK = 5
TFT_MOSI = 23
TFT_MISO = 19
from machine import Pin, SPI
from rgb import color565
import st7735
import rgb_text
import time
spi = SPI(2)
spi.init(mosi=Pin(TFT_MOSI), sck=Pin(TFT_SCLK), miso=Pin(TFT_MISO), baudrate=4000000)
print(spi)
display = st7735.ST7735R(spi, dc=Pin(TFT_DC), cs=Pin(TFT_CS), rst=Pin(TFT_RST))
print(display)
display.fill(color565(255, 0, 0))
rgb_text.text(display, "Hello", x=0, y=0, color=0xffff, background=0x0000)
display.pixel(64, 64, 0)
time.sleep(1)
display.fill(color565(0, 0, 0))
rgb_text.text(display, "World", x=0, y=0, color=0xffff, background=0x0000)
time.sleep(1)
spi.deinit()
Seems like a pretty good buy for something that is so easy to get working. Might not be as easy as some of the more common attachments, but it's likely a lot easier to get working than some random display.
Join our Discord Channel to connect with us and nominate your own or somebody else's posts in our review channel.
Help us to reward you for making it ! Join our voting trail or delegate steem power to the community account.
Your post is also presented on the community website www.steemmakers.com where you can find other selected content.
If you like our work, please consider upvoting this comment to support the growth of our community. Thank you.