开云体育

ctrl + shift + ? for shortcuts
© 2025 开云体育

RTC on enhanced Nextion display?


 

I just updated my uBITx v6 to a 2.8” enhanced Nextion. ?Very pleased with the upgrade. ?I did notice that the Nextion has a button battery holder on the backside. ?Apparently these have real time clock (RTC) capability. ?Has anyone included a clock display in their firmware?


 

Hi Calvin,

I have not seen a tft file with a clock display.? Two possible reasons:
1 - The models with the RTC are recent additions after most development work was done on the KD8CEC/Nextion software.
2 - There was insufficient memory in the Nextion to allow the extra display or real estate on the screen to fit in.

You could modify one of the HMI files to include a clock function.? Check on Mark AJ6CU's GitHub page:


73
Evan
AC9TU


 

Perhaps you can just modify the Nextion screen. Have never thought about it.

You would need to add a way to set the clock from within Nextion. That would require adding a button to the main screen or the menu section to allow you to set the clock. Then in the new screen you could provide the setting function. I am assuming that accessing the clock is available to the Nextion code and that the clock is not some I2C or SPI address that the nano would have to interact with. I would recommend confirming that first.?

If the clock is only setable by the processor then you are in for some real pain figuring out how to add that. If you must go there, let me know and I can point you to the file you need to get familiar with to figure it out.?


hopefully you can just do it within the Nextion code! ?That would be cool.?


keep us informed.?

73
Mark
--
AJ6CU/7
KD8CEC 2.0, Nextion Screens,? and open source uBITX Raduino boards for Arduino IOT, BLE, RP2040, Teensy 4.0, and Raspberry Pi Pico
https://github.com/aj6cu


 

Mark,

You may or may not remember, but I revamped the Nextion uBITX screen layout for my 3.2" Enhanced to include display/setting of a RTC.

I sent you the screen definition (which includes the necessary coding) and you included them among the user-supplied screens in your github.

Hope this helps,

Richard Lambert-Porter


 

Richard,

You are right!? Forgot about this one.?

Here is the link for the OP.



73
Mark
--
AJ6CU/7
KD8CEC 2.0, Nextion Screens,? and open source uBITX Raduino boards for Arduino IOT, BLE, RP2040, Teensy 4.0, and Raspberry Pi Pico
https://github.com/aj6cu


 

I’m still pretty new at this. ?How could I adapt this for a 2.8” enhanced display? ? Any screen shots of what this would look like?


 

Calvin,

Unfortunately a little learning curve to understand the layout and programming of the KD8CEC Nextion screens. The first step is to download the latest Nextion editor ( ). And then download the hmi file that you will find here:



He provided two formats for the date, the format is coded into the file name. Now open it up in the Nextion editor. (It may automatically upgrade the format and ask you to save it depending on the age of the .hmi file)

At this point, youtube tutorials on the Nextion editor are your friends...? You should see on the main screen a placeholder for the date/time. Select that and then look at the tabs that appear towards the bottom of the editor. These tabs have instructions on what happens when they get fired. Some are fired on press, some release, etc.

Although I never looked at the code, I suspect that a click event might bring up a screen to set time. (look for a "page xxxx" command.) You can then select this page on the listing of pages on the right. There should also be some timer event or something else that links the time/clock to the RTC.

Fortunately, all the coding and ux can be done in the Nextion editor and does not require any firmware changes.? Once you track everything down in the 3.2, you can then transplant that code to your screen (2.8"?)

It will take some time, but once you get it it is fun!

73
Mark
--
AJ6CU/7
KD8CEC 2.0, Nextion Screens,? and open source uBITX Raduino boards for Arduino IOT, BLE, RP2040, Teensy 4.0, and Raspberry Pi Pico
https://github.com/aj6cu