Start a new topic


I want to send "dim value" on the first opening.


byte light = eprom read  (example light = 75)

String light_str = String(light); 

light_str = "dim=" + light_str;


But fault message:

cannot convert 'String' to 'const char*' for argument '1' to 'void sendCommand(const char*)' Reference

String light_str is using Object library of String

string light_str would use char array

Reference and Dereferencing Operators

Also you can refer to 

Iteadlib Arduino Nextion Library  NexText.cpp

NexText::setText function shows how to use String (StringObject)

Login or Signup to post a comment