Nextion dash
- Peter
- Posts: 320
- Joined: Fri Dec 14, 2018 9:07 pm
- Location: North West Lancs, UK
- Been thanked: 9 times
Nextion dash
Hi Forum. Just thought to show my Nextion 7” dash. All functioning and updated by Arduino reading CAN from CombiV8 and Olimex.
Re: Nextion dash
Looks good. I am messing around with some of these displays but because I don't have a drivetrain yet it's all just UI graphics.
-< Mazda Eunos JC Cosmo rotary -> EV conversion w/ Lexus GS450H gear >-
-
- Posts: 395
- Joined: Sun Aug 25, 2019 12:39 pm
- Location: Finland
- Has thanked: 58 times
- Been thanked: 14 times
Re: Nextion dash
Nice project 

Any opinions are my own, unless stated otherwise. I take no responsibility if you follow my way of doing things and it doesn't work. Please double check with someone who knows what they are doing.
- Peter
- Posts: 320
- Joined: Fri Dec 14, 2018 9:07 pm
- Location: North West Lancs, UK
- Been thanked: 9 times
Re: Nextion dash
Thanks for your comments. Was a bit of a challenge initially but got there in the end. If you need any help with sorting one I am happy to do as much as I can. Peter
- Peter
- Posts: 320
- Joined: Fri Dec 14, 2018 9:07 pm
- Location: North West Lancs, UK
- Been thanked: 9 times
Re: Nextion dash
Hi zippy500. As far as the Nextion screen is involved that’s not too bad. Arduino code is not bad too so once you have done a simple gauge it’s just a matter of tweaking the code. For instance the gauge needle is in degrees so using ‘map’ you can set values to degrees. Example myRPM = map(RPM, 0, 9000, 0, 360) angle depends on how you have oriented your gauge.
- Peter
- Posts: 320
- Joined: Fri Dec 14, 2018 9:07 pm
- Location: North West Lancs, UK
- Been thanked: 9 times
Re: Nextion dash
Here is my code used for the RPM gauge on my dash.
Not sure why I cant upload files with 'ino' extension so have copied and pasted, sorry.
Not sure why I cant upload files with 'ino' extension so have copied and pasted, sorry.
Code: Select all
// Motor RPM
if (RPM < 3700)
{getRPM = map(RPM, 0, 3700, 270, 360);} // Angle is to allow needle to start at 6 o'clock position
if (RPM > 3700)
{getRPM = map(RPM, 3700, 9000, 0, 130);} // Angle for above 3700 RPM starts at 9 o'clock position
if (getRPM == oldRPM)
{;}
else
{oldRPM = getRPM;
Serial.print("z2.val=");
Serial.print(getRPM); // getRPM value is in degrees
Serial.write(0xff); // You must send Serial code three times
Serial.write(0xff);
Serial.write(0xff);
if (RPM >-5) {RPMNeedle = 2024;} // RPMNeedle value selects colour
if (RPM >6500) {RPMNeedle = 63488;}
Serial.print("z2.pco=");
Serial.print(RPMNeedle);
Serial.write(0xff);
Serial.write(0xff);
Serial.write(0xff);}
Re: Nextion dash
Use code button ( </> ) when adding code, and maybe type of code (C++ Arduiono Nextion...)
Code: Select all
1 print "Hello"
2 goto 1

Thomas A. Edison “I have not failed. I've just found 10,000 ways that won't work"
- SciroccoEV
- Posts: 370
- Joined: Thu Oct 10, 2019 1:50 pm
- Location: Luton UK
- Been thanked: 15 times
Re: Nextion dash
Do you think it's got enough brightness/contrast for main display vehicle use? Many displays are completely washed out by a bit of sunlight.