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

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


Dear Sebastien, how did you use that value you have received ?

In my case, this function does not work. in the variable int prints -1. How to solve this?

Short answer - ask the author, and not itead.

This Forum closed since Nov 17, 2015

Use new forum at