Topics

Nextion Question

Dennis
 

Greetings,
I have a working ver5 uBitx using the "stock" display. I want to now use a 3.2" Nextion and CEC software. Could someone point me to the proper sketch. I am using what I believe to be the proper sketch and have set up ubitx.h like this:
"
//===========================================================================
// Compile Option
//===========================================================================
//Ubitx Board Version
#define UBITX_BOARD_VERSION 5           //v1 ~ v4 : 4, v5: 5
 
//Depending on the type of LCD mounted on the uBITX, uncomment one of the options below.
//You must select only one.
//#define UBITX_DISPLAY_LCD1602P        //LCD mounted on unmodified uBITX (Parallel)
//#define UBITX_DISPLAY_LCD1602I        //I2C type 16 x 02 LCD
//#define UBITX_DISPLAY_LCD1602I_DUAL   //I2C type 16 x02 LCD Dual
//#define UBITX_DISPLAY_LCD2004P        //24 x 04 LCD (Parallel)
//#define UBITX_DISPLAY_LCD2004I        //I2C type 24 x 04 LCD
#define UBITX_DISPLAY_NEXTION         //NEXTION LCD
 
//#define UBITX_DISPLAY_NEXTION_SAFE      //Only EEProm Write 770~775
#define I2C_LCD_MASTER_ADDRESS_DEFAULT  0x27     //0x27  //DEFAULT, if Set I2C Address by uBITX Manager, read from EEProm
#define I2C_LCD_SECOND_ADDRESS_DEFAULT  0x3F     //0x27  //only using Dual LCD Mode
"
After wiring in the Nextion I have power (it lights up), but no apparent link to the radino code. Pushing in the sd card does nothing (it's loaded with ubtix_32_E.tft) either.

I would appreciate someone pointing me in the right direction. At the moment I am at a loss as to how to proceed.

Kind Regards,
73, Dennis W7DRW

Mark Hatch
 

Dennis,

Are you trying to use the KD8CEC software or just writing your own sketches for the Nextion.

In relationship to KD8CEC, Ian did some fancy footwork in his approach where he created buffers of commands/datas that he transferred back and forth between the Nextion and the Raduino. He did not use the standard Auduino library. On the Nextion side, this meant that he used timers and events (like a button press) to actually program that guy. BTW: Becareful of the Nextion code. Spaces matter! Especially in if/elseif statements.

73
Mark

Dennis
 

Hi Mark,
I'm trying to use the CEC software.

Dennis

Mark Hatch
 

Dennis,

You need to looks at the buffers that go back and forth between the Nextion and the Raduino. Quite frankly, I never really figured them out because there is limited comment in the code. So not going to be a lot of help here.

There are some basic definitions in the code (this is a command, this should be the last buffer sent, etc.)   And then you are going to see how they are uninterpreted on the Nextion side. (you will need to download the Nextion editor) to see how the buffers are interpreted there.

Much different than the typical interaction between Nextion and a Auduino script.

Sorry, cannot be more help.

Mark

Evan Hand
 

Here is the link to the KD8CEC github for version 1.2 that has support for the uBitx v5:
https://github.com/phdlee/ubitx/releases/tag/v1.20

I believe that the Nextion tft files link is on this page:
http://www.hamskey.com/2018/06/ubitx-with-nextion-lcd-cec-firmware.html

Be sure to note the information in the v1.2 zip file that describes the different files in the archive.

Hope this helps
Evan
AC9TU

Dennis
 

Thanks Evan,
I have downloaded the most current files (that you listed) and have uploaded first the sketches and then the hex files to see if there was any difference. The radio loses volume after these uploads and does not drive the Nextion. I really don't know what to investigate next. The radio works fine with the original software and display. BTW the last time I uploaded a hex file I had the original display plugged in and it worked just fine even though the file I uploaded was for the Nextion display. That really doesn't make sense to me.

Regards,

73, Dennis W7DRW

Evan Hand
 

Please be sure to use the correct hex file, there are a number of them.

Here is the FileNameInfo.txt listed.  Note that the hex file to use is dependent on the display that you will connect.  The the last part of the name indicates the display.  the file ending in _16P is the CEC software that will work with the original display.  The file for the Nextion displays end in _NX.  The _NX_S is for use with the I2C connected separate S meter.  Go to the Hamskey site to find out more.


http://www.hamskey.com/2018/04/various-lcd-support-in-ubitx-with.html
 
prefix   : UBITXV5_CEC_
Version  : Vxxxx (ex: V1.097)
LCD Type : _XXX  (ex: 16x02 Parallel = 16P, 20x04 Parallel = 20P, 20x04 I2C = 20I, Nextion LCD = NX)
Signal Meter Type (Option) : none : Analaog Meter using A7 PIN
                             _S   : I2C Signal Meter using I2C Port
 
UBITXV5_CEC_Vxxxxx_16P.hex    : It is the LCD equipped with uBITX. Default LCD, 16x02 Parallel LCD
UBITXV5_CEC_Vxxxxx_16P_S.hex  : _16P with I2C Meter
 
 
UBITXV5_CEC_Vxxxxx_16I.hex    : 16x02 I2C LCD
UBITXV5_CEC_Vxxxxx_16I_S.hex  : _16I with I2C Meter
 
 
UBITXV5_CEC_Vxxxxx_20P.hex    : 20x04 Parallel LCD
UBITXV5_CEC_Vxxxxx_20P_S.hex  : _20P with I2C Meter
 
 
UBITXV5_CEC_Vxxxxx_20I.hex    : 20x04 I2C LCD
UBITXV5_CEC_Vxxxxx_20I_S.hex  : _20I with I2C Meter
 
UBITXV5_CEC_Vxxxxx_16D.hex    : 16x02 I2C Dual LCD
UBITXV5_CEC_Vxxxxx_16D_S.hex  : _16D with I2C Meter
 
UBITXV5_CEC_Vxxxxx_NX.hex     : Nextion LCD
UBITXV5_CEC_Vxxxxx_NX_S.hex   : _NX with I2C Meter