https://github.com/androidcrypto/esp32_c6_waveshare_st7789_bme280
Getting started with a BME280 environment sensor connected to an ESP32-C6 Waveshare LCD device and ST7789 TFT display
https://github.com/androidcrypto/esp32_c6_waveshare_st7789_bme280
bme280 esp32 esp32-c6 i2c st7789 tft-display waveshare
Last synced: 12 days ago
JSON representation
Getting started with a BME280 environment sensor connected to an ESP32-C6 Waveshare LCD device and ST7789 TFT display
- Host: GitHub
- URL: https://github.com/androidcrypto/esp32_c6_waveshare_st7789_bme280
- Owner: AndroidCrypto
- License: mit
- Created: 2025-05-20T09:36:56.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2025-05-20T09:40:09.000Z (about 1 month ago)
- Last Synced: 2025-05-20T10:43:30.903Z (about 1 month ago)
- Topics: bme280, esp32, esp32-c6, i2c, st7789, tft-display, waveshare
- Language: C++
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ESP32-C6 Waveshare LCD device with ST7789 TFT display and connected BME280 sensor
Getting started with a **BME280** environment sensor connected to an **ESP32-C6 Waveshare LCD** device and a TFT display with driver chip **ST7789**.This is the accompanying repository for my article "**Getting started with a BME280 environment sensor connected to an ESP32-C6 Waveshare LCD device and ST7789 TFT display**": https://medium.com/@androidcrypto/getting-started-with-a-bme280-environment-sensor-connected-to-an-esp32-c6-waveshare-lcd-device-and-d333a0ff79a3.
My display is a 1.47 inch large TFT display with 172 x 320 pixels.
## Settings for the display specific setup file
I'm using a display specific setup file for the combination ESP32-C6 Waveshare LCD with TFT display driver ST7789. This file contains e.g. the display driver, size and pins for the ESP32-device. If your display has a different size please change the height and width accordingly.
### Copy a file to the User_Setups folder
Please copy the file
Setup701_C6_WS_ST7789_172x320.h
to the **User_Setups** folder.
### Edit the User_Setup_Select.h file
You need to place the following line in the root folder's "**User_Setup_Select.h**" file
#include // ESP32-C6 Waveshare, 80 MHz
Second: please comment all other "#include..." entries like this, especially the "//#include " entry.
````
// Example User_Setup files are stored in the "User_Setups" folder. These can be used
// unmodified or adapted for a particular hardware configuration.
#ifndef USER_SETUP_LOADED // Lets PlatformIO users define settings in
// platformio.ini, see notes in "Tools" folder.
///////////////////////////////////////////////////////
// User configuration selection lines are below //
///////////////////////////////////////////////////////
// Only ONE line below should be uncommented to define your setup. Add extra lines and files as needed.
//#include // Default setup is root library folder
// Setup file in folder Arduino/libraries (updates will not overwrite your setups)
#include // ESP32-C6 Waveshare, 80 MHz
````## Troubleshooting for upload problems
I'm used to being able to start the upload directly on other boards, but this failed on my board. The reason is simple - the board is not automatically in upload mode. To resolve this problem, I have to press the **Boot button** and hold it pressed, then press the **Reset button** and now release the **Boot button**. That's it, the board is in upload mode and receives the new code.
But that's not all: after uploading the sketch, you have to press the **Reset button** again to bring the board back to regular mode.
## Important note
You need to modify the display library TFT_eSPI to get the code to work. Please find instructions on how to do this in my forked TFT_eSPI repository here on GitHub: [https://github.com/AndroidCrypto/TFT_eSPI](https://github.com/AndroidCrypto/TFT_eSPI).