Start a new topic

err galore

So I am pretty much stuck, since every tutorial and example I have tried I get similar errors.  But they all surround the central point of changing a text or a number.  I have the 5 in enhanced version and currently using the mega.  The errors I get are recvRetNumber err, recvRetCommandFinished err for the compnumber and comptext examples.


This dbserial is printed to Serial monitor in the NexHardware.cpp file

- it is there to let you know that it the last command has passed/failed

- when result is err, it generally means serial is not configured properly.


The Iteadlib comes preconfigured for MEGA at Serial2 RX2/TX2 at 9600 baud.

   (see readme.md file of the Iteadlib)

Nextion default baud rate from factory is 9600 baud.


Have 9600 baud set on the .ino file.  RX and TX connected to TX2 and RX2.  In NewConfig have

 

#define dbSerial Serial
#define nexSerial Serial2

 I get transmit and receive lights on the Arduino and get data on the serial monitor, but the last line is the err.


I am literally trying to use the example code in the itead Arduino library with a modified tft through the editor to allow for appropriate use.

Post both

 - modified HMI file

 - ino file

 Here are the four files.  I am using the 5 inch enhanced nextion.

 


ino
(3.07 KB)
HMI
HMI
ino
(3.38 KB)

There are the modified ones?


The HMI files are just modified for my device.

nothing special.

All I am trying to do is get it to work, to understand the concepts and methodology.

Sorry, perhaps NewConfig was meant as NexConfig.

Show what your serial monitor output is ...

Yes, my apologies.

 

recvRetCommandFinished err
recvRetCommandFinished err
setup done
[1778:0,3,b1]
b1PopCallback
recvRetString[0,]
recvRetCommandFinished err
[1790:0,2,b0]
b0PopCallback
recvRetString[0,]
recvRetCommandFinished err
[1778:0,3,b1]
b1PopCallback
recvRetString[0,]
recvRetCommandFinished err

 

This is from boot,(minus),(plus),(minus) or the Comptext example


*from

Methodology (seen in Iteadlib code) is ....


NexConfig.h

   - #define will replace dbSerial and nexSerial with your Serial and Serial2 (defaults)

NexObject.h

   - creates object structure for page, component id and objname used in a declaration

      NexComponent  myComponent = NexComponent(pageno,compid,objname)

NexTouch.h

   - Inherits NexObject adds function pointers for Push (Press) and Pop (Released) events

NexHardware.h/.cpp

   - nexInit()  initial settings, baudrate, bkcmd, page 0 start

   - nexLoop() if touch received, calls iterate, if function attached - calls parameter function

   - other supporting

NexComponent.h 

   - function for each green attribute that is changeable at runtime, getValue() setValue() etc

   - one Nex_____ for each component (NexText, NexButton ... etc)

Nextion.h

   - file of master #includes

   - compiler will create code only for what was used.


All functions basically parse out to the equivalent Nextion Instruction Set terminated formats

   t0.txt="Hello"ÿÿÿ

   n0.val=23ÿÿÿ

That's what I was gathering, but why won't the examples work at least with the enhanced 5 inch?

Login or Signup to post a comment