Nextion dash

Tell us about the project you do with the open inverter
Post Reply
User avatar
Peter
Posts: 320
Joined: Fri Dec 14, 2018 9:07 pm
Location: North West Lancs, UK
Been thanked: 9 times

Nextion dash

Post by Peter »

Hi Forum. Just thought to show my Nextion 7” dash. All functioning and updated by Arduino reading CAN from CombiV8 and Olimex.
Attachments
image.jpg
User avatar
sfk
Posts: 289
Joined: Mon Jan 14, 2019 8:29 pm
Location: Wellington, NZ
Has thanked: 2 times

Re: Nextion dash

Post by sfk »

Peter wrote: Thu Jul 09, 2020 9:37 pm Hi Forum. Just thought to show my Nextion 7” dash. All functioning and updated by Arduino reading CAN from CombiV8 and Olimex.
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 >-
JaniK
Posts: 395
Joined: Sun Aug 25, 2019 12:39 pm
Location: Finland
Has thanked: 58 times
Been thanked: 14 times

Re: Nextion dash

Post by JaniK »

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.
User avatar
Peter
Posts: 320
Joined: Fri Dec 14, 2018 9:07 pm
Location: North West Lancs, UK
Been thanked: 9 times

Re: Nextion dash

Post by Peter »

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
zippy500
Posts: 218
Joined: Fri Jan 04, 2019 8:42 am
Location: United Kingdom
Has thanked: 76 times
Been thanked: 3 times

Re: Nextion dash

Post by zippy500 »

nice work, is there a lot of coding involved ?
User avatar
Peter
Posts: 320
Joined: Fri Dec 14, 2018 9:07 pm
Location: North West Lancs, UK
Been thanked: 9 times

Re: Nextion dash

Post by Peter »

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.
User avatar
Peter
Posts: 320
Joined: Fri Dec 14, 2018 9:07 pm
Location: North West Lancs, UK
Been thanked: 9 times

Re: Nextion dash

Post by Peter »

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.

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);}
User avatar
joromy
Posts: 371
Joined: Fri Jun 28, 2019 12:56 pm
Has thanked: 1 time
Been thanked: 4 times

Re: Nextion dash

Post by joromy »

Peter wrote: Sat Jul 11, 2020 1:22 pm 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.
Use code button ( </> ) when adding code, and maybe type of code (C++ Arduiono Nextion...)

Code: Select all

1 print "Hello"
2 goto 1
And edit your post :)
Thomas A. Edison “I have not failed. I've just found 10,000 ways that won't work"
User avatar
Peter
Posts: 320
Joined: Fri Dec 14, 2018 9:07 pm
Location: North West Lancs, UK
Been thanked: 9 times

Re: Nextion dash

Post by Peter »

Thanks joromy. Done to your specification :-)
User avatar
SciroccoEV
Posts: 370
Joined: Thu Oct 10, 2019 1:50 pm
Location: Luton UK
Been thanked: 15 times

Re: Nextion dash

Post by SciroccoEV »

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.
Post Reply