https://github.com/Bodmer/OpenWeather/tree/master/examples/TFT_eSPI_OpenWeather, but fixed to work on PlatformIO!
This branch contains the the original TFT_eSPI_OpenWeather example by Bodmer, only modified to just compile and upload on PlatformIO.
Go to the modifications branch to see my changes!
You need:
- ESP32
- 320x240 TFT (I used this one by Adafruit)
- Some way to wire it all together, probably a breadboard and wires
- ESP32 ground to TFT ground
- ESP32 USB 5v to TFT VIN
- ESP32 18 (VSPI CLK) to TFT CLK
- ESP32 19 (VSPI MISO) to TFT MISO (optional)
- ESP32 23 (VSPI MOSI) to TFT MOSI
- ESP32 5 (VSPI default CS) to TFT CS**
- ESP32 17 to TFT D/C**
** These can be changed in src/User_Setup.h file for TFT_eSPI
- Clone this repo somewhere.
- Open in your preferred IDE. (for example, VS Code with PlatformIO plugin)
- Rename
src/All_Settings template.htosrc/All_Settings.hand change your settings. - Run
PlatformIO: Project Tasks - <board name> - General - Build. (So the libraries are downloaded) - Copy the contents of
src/User_Setup.hto.pio\libdeps\<your board name>\TFT_eSPI\User_Setup.h. - Change
upload_portandmonitor_portinplatformio.iniif needed. (much more reliable then relying on auto-detect) - Run
PlatformIO: Project Tasks - <board name> - General - Upload. - Run
PlatformIO: Project Tasks - <board name> - Platform - Build Filesystem Image. - Run
PlatformIO: Project Tasks - <board name> - Platform - Upload Filesystem Image. - Reset board if needed.