Born as a project for my bike, ESP32-bike-inclinometer, allows you to check in real time the lateral and vertical inclination of the vehicle.
- DOIT ESP32 DEVKIT V1
- MPU6050
- GC9A01
- Be sure to change the following settings within the
User_Setup.h
file to theC:\Users\name\Documents\Arduino\libraries\TFT_eSPI
directory.
#define GC9A01_DRIVER
#define TFT_MOSI 23 // In some display driver board, it might be written as "SDA" and so on.
#define TFT_SCLK 18
#define TFT_CS 22 // Chip select control pin
#define TFT_DC 16 // Data Command control pin
#define TFT_RST 4 // Reset pin (could connect to Arduino RESET pin)
This code requires followings libraries (and relatives dependencies) to run:
- TFT_eSPI
- Adafruit_MPU6050
Code is not optimized at all. If you find a way to do it better, please, let me know in comments 🤗