Well, it took me a while to figure out how to get the ESP-WROVER-KIT up and running within PlatformIO. I'm testing with hardware revision 4.1. Keep in mind to set the correct jumper connections before set this thing into action according to the description by ESPRESSIF.
I ran into some problems like searching what type of display controller is part of the board, where to switch on the LCD background light and so on. But here is a minimal example (arduino framework):
main.cpp
#include <Arduino.h>
#include "SPI.h"
#include <Adafruit_GFX.h> // Core graphics library
#include <Adafruit_ILI9341.h>
//#include <Fonts/FreeSans9pt7b.h>
#define TFT_DC 21
#define TFT_CS 22
#define TFT_MOSI 23
#define TFT_MISO 25
#define TFT_CLK 19
#define TFT_RST 18
Adafruit_ILI9341 display = Adafruit_ILI9341(TFT_CS, TFT_DC, TFT_MOSI, TFT_CLK, TFT_RST, TFT_MISO);
void setup() {
// put your setup code here, to run once:
pinMode(0, OUTPUT); // built-in LED (red)
pinMode(2, OUTPUT); // built-in LED (green)
pinMode(4, OUTPUT); // built-in LED (blue)
pinMode(5, OUTPUT); // LCD backlight
digitalWrite(0, HIGH);
digitalWrite(2, LOW);
digitalWrite(4, LOW);
digitalWrite(5, LOW); // LCD backlight on
display.begin();
//display.setFont(&FreeSans9pt7b);
display.setRotation(3);
display.fillScreen(ILI9341_BLACK);
display.setCursor(0, 12);
display.setTextColor(ILI9341_WHITE);
display.setTextSize(1);
display.println("Hello World!");
yield();
}
void loop() {
// put your main code here, to run repeatedly:
}
platformio.ini
[env:esp-wrover-kit]
platform = espressif32
board = esp-wrover-kit
framework = arduino
lib_deps =
adafruit/Adafruit GFX Library@^1.11.3
adafruit/Adafruit ILI9341@^1.5.12
Have a look at adafruit for more details regarding font types and other graphical elements.
Happy coding