Start a new topic

Get text from nextion into arduino variable

Hi All,

I am trying get text from nextion into arduino variable but its not working I tried the following:

  memset(buffer, 0, sizeof(buffer)); //

  b211.getText(buffer, sizeof(buffer)); //


and it only works if i set text manually using tState2.setText("Example"); and call the above again

I have also tried this arduino code but same problem:

 char text_char[4];

 tState2.getText(text_char, 4);


All I get is empty output in serial monitor expect if i manually do  tState2.setText("example"); . I dont want this i want to get the text from live nextion screen. I have been stuck for a week on this :

Any help would be apprecited

1 Comment

No one to offer help?

Login or Signup to post a comment