← All projects in the gallery
Fuel Gauge
by jonathan harrocks
A fuel gauge for a 240 x 240 round panel, fed from the diagnostic socket over CAN.
The arc fills with the level and carries a pointer round with it. The pointer is a picture named as the arc's Follower: the arc moves it whenever the value moves and turns it so its tip keeps pointing in at the arc, which is the part a plain knob cannot do. The graduations inside are a Scale's own ticks, with the reserve marked as a section of it.
The arc is not clickable, because a gauge is not a control: a finger on the glass must not move it. Below fifteen per cent a LOW banner comes up.
It reads PID 2F. Not every car reports fuel level over OBD-II; one that does not leaves this at empty, and the device takes a signal of your own for the frame your car puts it in instead.
About this design
Fuel Gauge is an LVGL interface for the ESP32-S3 + GC9A01 1.28" round (GC9A01 / GC9A01A 240 x 240, CST816S touch), with 1 screen and 9 widgets, made for Arduino (C++) on LVGL 9.
Screens
- Fuel
Hardware and build
- Board
- ESP32-S3 + GC9A01 1.28" round
- MCU
- ESP32-S3
- Display
- GC9A01 / GC9A01A
- Resolution
- 240 x 240
- Touch
- CST816S
- Graphics library
- GFX Library for Arduino
- LVGL
- v9
- Exports to
- Arduino (C++)
- Peripherals
- CAN bus / OBD-II (car diagnostics)
- Libraries
- lvgl, GFX Library for Arduino, TWAI driver (bundled with the core)
Notes from the author
Fuel level on a round panel, read from the car over CAN: an arc that fills and a pointer that rides it.
Using it
Open a copy in the designer and it is yours to edit: restyle the screens, move it to another board, and export the Arduino (C++) project. Designing is free, and a copy needs no account. Open the designer.
Every pin of the ESP32-S3 + GC9A01 1.28" round, and the preset this design starts from: ESP32-S3 + GC9A01 1.28" round pinout and LVGL designer.