This vehicle telemetry display combines GPS positioning, motion sensing, and temperature monitoring into a single touchscreen dashboard powered by an ESP32. The system reads real-time data from a NEO-6M GPS module, MPU-6050 accelerometer, and dual DS18B20 temperature sensors, displaying the information on a 3.2-inch ILI9341 TFT screen with touch controls.
Builders will receive a complete wiring diagram showing all sensor connections, a full parts list with component specifications, and ready-to-compile firmware that handles GPS parsing, IMU calibration, temperature logging, and multi-page display navigation. The assembly guide covers touchscreen integration, I2C and OneWire sensor setup, and pre-installation testing procedures to ensure reliable operation before final mounting.
Wiring diagram

Gather all the parts
Assemble it in 4 steps
1. Connect the touchscreen
With USB unplugged, follow the wiring list for the 3.3 V screen. SPI data and clock are shared by the display and touch controller. Leave the touch interrupt pin unused. Use a module with onboard backlight current limiting as specified by its maker.
2. Connect the motion and GPS modules
Connect the motion sensor to SDA and SCL. Connect GPS TX to GPIO16; leave GPS RX and PPS unused. Choose a GPS breakout rated for 3.3 V input power and place its antenna face up with a clear view of the sky.
3. Connect both temperature probes
Check the probe maker's wire colours before wiring. Connect each probe to its own data pin and put one 4.7 kΩ resistor between that data wire and 3V3. Keep the inside probe away from the screen and vents. Put the outdoor probe in shaded airflow away from engine heat and route its cable away from moving or hot parts.
4. Test on USB before mounting
Test from USB, then use a regulated vehicle USB adapter. Secure the unit clear of airbags, controls and the driver's view. Mount the motion sensor flat and aligned with the vehicle, then hold the tilt screen for a second while parked on level ground to zero both angles.
- Never wire the board directly to vehicle 12 V. Use the touchscreen only when parked. Tilt readings during acceleration or cornering are not reliable.
Review all connections
1. Connections between "screen" and "ESP32"
2. Connections between "imu" and "ESP32"
3. Connections between "gps" and "ESP32"
4. Connections between "inside" and "ESP32"
5. Connections between "outside" and "ESP32"
6. Connections between "ri" and "ESP32"
7. Connections between "ro" and "ESP32"
Deploy the firmware
#include <Arduino.h>
#include <SPI.h>
#include <Wire.h>
#include <Adafruit_ILI9341.h>
#include <XPT2046_Touchscreen.h>
#include <OneWire.h>
#include <DallasTemperature.h>
#include <TinyGPS++.h>
Adafruit_ILI9341 lcd(27,26,25);
XPT2046_Touchscreen touch(33);
OneWire wi(32), wo(14);
DallasTemperature ti(&wi), to(&wo);
TinyGPSPlus gps;
uint32_t tempAt, frameAt, sampleAt, utcAt, utcSeconds;
bool clockSet=false, pressed=false, imuOK=false;
int page=0;
float inC=-127,outC=-127,x,y,z,zeroP,zeroR;
String last[5];
bool reg(uint8_t address,uint8_t value){ Wire.beginTransmission(0x68); Wire.write(address); Wire.write(value); return Wire.endTransmission()==0; }
void sample(){
Wire.beginTransmission(0x68); Wire.write(0x3B);
if(Wire.endTransmission(false)!=0 || Wire.requestFrom(0x68,6)!=6){imuOK=false;return;}
float a[3]; for(int i=0;i<3;i++){int hi=Wire.read(),lo=Wire.read();a[i]=int16_t((hi<<8)|lo)/16384.0f;}
x=imuOK?0.8f*x+0.2f*a[0]:a[0]; y=imuOK?0.8f*y+0.2f*a[1]:a[1]; z=imuOK?0.8f*z+0.2f*a[2]:a[2]; imuOK=true;
}
void line(int i,String text){if(last[i]==text)return;last[i]=text;lcd.fillRect(8,43+i*31,304,26,ILI9341_BLACK);lcd.setCursor(8,45+i*31);lcd.print(text);}
void layout(){lcd.fillScreen(ILI9341_BLACK);lcd.setTextSize(2);lcd.setTextColor(ILI9341_CYAN);lcd.setCursor(8,8);lcd.print(page==0?"CLOCK / TEMPERATURE":page==1?"TILT / ACCELERATION":"GPS LOCATION");lcd.drawFastHLine(0,199,320,ILI9341_CYAN);lcd.setCursor(8,213);lcd.print(page==1?"Tap: GPS | Hold: zero":"Tap for next screen");lcd.setTextColor(ILI9341_WHITE);for(auto &s:last)s="~";}
void setup(){
pinMode(27,OUTPUT);digitalWrite(27,HIGH);pinMode(33,OUTPUT);digitalWrite(33,HIGH);
SPI.begin(18,19,23);lcd.begin();lcd.setRotation(1);touch.begin();
Wire.begin(21,22);reg(0x6B,0);reg(0x1C,0);
Serial2.begin(9600,SERIAL_8N1,16,-1);
ti.begin();to.begin();ti.setWaitForConversion(false);to.setWaitForConversion(false);ti.requestTemperatures();to.requestTemperatures();tempAt=millis();layout();
}
String temp(float c){return c>=-55 && c<=125?String(c,1)+" C":String("Unavailable");}
void loop(){
while(Serial2.available())gps.encode(Serial2.read());
uint32_t now=millis();
if(gps.time.isUpdated() && gps.time.isValid()){
utcSeconds=gps.time.hour()*3600UL+gps.time.minute()*60UL+gps.time.second();utcAt=now;clockSet=true;
}
if(now-tempAt>=1500){inC=ti.getTempCByIndex(0);outC=to.getTempCByIndex(0);ti.requestTemperatures();to.requestTemperatures();tempAt=now;}
if(now-sampleAt>=40){sampleAt=now;sample();}
float p=atan2f(-x,hypotf(y,z))*RAD_TO_DEG,r=atan2f(y,z)*RAD_TO_DEG;
static uint32_t down;static bool held;
bool t=touch.touched();
if(t&&!pressed){down=now;held=false;}
if(t&&page==1&&!held&&now-down>=900){if(imuOK){zeroP=p;zeroR=r;}held=true;}
if(!t&&pressed&&!held&&now-down>=40){page=(page+1)%3;layout();}
pressed=t;
if(now-frameAt<200)return;frameAt=now;
if(page==0){
if(clockSet){unsigned long s=(utcSeconds+(now-utcAt)/1000)%86400;char b[28];snprintf(b,sizeof b,"%02lu:%02lu:%02lu UTC",s/3600,s/60%60,s%60);line(0,b);}else line(0,"Waiting for GPS time");
line(1,"Inside: "+temp(inC));line(2,"Outside: "+temp(outC));
if(clockSet)line(3,gps.time.age()>3000?"Clock running unsynced":"GPS time synced");
}else if(page==1){
if(!imuOK){line(0,"IMU unavailable");for(int i=1;i<5;i++)line(i,"");return;}
line(0,"Pitch: "+String(p-zeroP,1)+" deg");float roll=r-zeroR;if(roll>180)roll-=360;if(roll< -180)roll+=360;
line(1,"Roll: "+String(roll,1)+" deg");line(2,"X "+String(x,2)+" Y "+String(y,2)+" g");line(3,"Z "+String(z,2)+" g");line(4,"Tilt: read when parked");
}else{
bool fix=gps.location.isValid()&&gps.location.age()<3500;
line(0,fix?"Lat: "+String(gps.location.lat(),6):"Waiting for GPS fix");line(1,fix?"Lon: "+String(gps.location.lng(),6):"");
line(2,gps.satellites.isValid()&&gps.satellites.age()<3500?"Satellites: "+String(gps.satellites.value()):"Satellites: --");
}
}Remix this project
Make it yours in one click
Open a full copy of this project in your own Schematik workspace, diagram, code, parts, and assembly steps included. Swap the sensor, add features, or redesign the whole thing with AI. The author's original stays untouched.




