Start a new topic

nextion 2.4 display

hi I hope someone can help out, need to display a temperature reading on a nextion display, could someone please tell me how?

School project?

No Patrick later on going to be boiler control for my boiler at home,self taught,at moment raspberry pi and three ds20b18 and a oled .96 display

Perhaps the OpenSource Fish Tank project can show the techniques for Temp on screen

let me find the link ...

hi Patrick tried the above but its been done on a screen bigger than the 2.4",have you any other examples?

That should be perfectly fine, the HMI can be loaded into your Nextion Editor even if you do not have that size screen.  The Arduino code doesn't load in your Nextion device either, but it was the methods to display a temperature on the Nextion device that you were after and the code for this purpose exists.

I am almost certain, if memory serves me correctly, they use the temperature device you wish to use.

Thanks for swift reply but tried and had screen resolution errors this was designed for a 4.3 screen 480x272, 2.4 screen is 320x240

Your Nextion Editor can handle the settings for the 4.3" from the setting menu by selecting the 4.3" as the device rather than the 2.4".  You are attempting to examine the hmi and the ino to see how things are done to have a number from a temperature sensor be displayed on the Nextion device.  What I offered will do just that.

But it seems you are looking for someone to have done this work for you, and perhaps if you wait long enough, someone else from the forum may decide to make your project for you.  But unfortunately, it will not be me.

Re-review the example I offered up to assist you accomplishing your goal, and review your options.

Ok I get you,in nextion editor input 4.3 screen not 2.4,will it tell me the code to do this in the editor?

Their HMI file should be already in 4.3" format, so when you load it into the Nextion Editor, it should already display it - you just wont be compiling it and uploading it to your 2.4"

This is partnered with the Arduino .ino code, and you will need to examine both side by side to begin to see how it is done.  Most is the button press sending its component ID to the MCU and then what the MCU does with that particular button press.

The key here is it is the only code I know of that uses the temperature sensor, and the Arduino style code for that sensor is also inside the .ino file

So if you go through and examine how each bit of code is creating the result, you have enough to replicate it for your purpose on your 2.4" model

(besides, you can do a better job that how the fishtank example was done)

Many thanks Patrick,I will look into it,I think I may have a ardunio,but my goal is using a raspberry pi

The C style coding in Arduino is not that far off from the C style coding of the Raspberry Pi

Perhaps a few subtle differences, but enough similarities for you to grasp, learn and then make for the Raspberry in it's C compiler.

Login or Signup to post a comment