Start a new topic

Number value to be send to ARDUINO

 Dear all;


I'm starting using this wonderful Nextion display, !


For one of my project, I need to "transfer" the value of a number field from Nextion to Arduino.


Using the library "nextion.h" developped by Ricardo Mena; I tried this code in Arduino :


 myNextion.sendCommand("get n0.val");
 String VALUE = myNextion.listen(); //check for message
 Serial.println(VALUE);


In fact, I obtain something on my screen, but far away from what I'm expecting.


by example for the value 85, I receive "qU⸮⸮⸮" on the screen.


Is it a way to "translate" this answer to the expected value, 85 ? or is it another way to proceed to obtain the right value ?


Regards, and thanks in advance !





You can try asking the author of such library.

  - He as the programmer of his code, would know codes meaning.


Dear all;

I received the answer, many thanks to Mr. Mena !

getComponentValue("n0"), this method return an int value



 

Login or Signup to post a comment