Hi All,
I’m trying to read an String and set an INT value from terminal widget for 2 different temperature sensors, I have been reading some post but I haven’t found something similar.
I would like to something like this in the terminal
write in terminal: set temp1 20 (this will set the value 20 to the temp1 into variable valueTemp1)
write in terminal: set temp2 34 (this will set the value 34 to the temp2 into variable valueTemp2)
I want to enter the values from terminal instead of use the slider or the Step Widgets. I checked the terminal example but don’t know how this can work for String and INT values, can this be achieved with something similar?
Thanks for your help!
BLYNK_WRITE(V1)
{
// if you type "Marco" into Terminal Widget - it will respond: "Polo:"
if (String("Marco") == param.asStr()) {
terminal.println("You said: 'Marco'") ;
terminal.println("I said: 'Polo'") ;
} else {
// Send it back
terminal.print("You said:");
terminal.write(param.getBuffer(), param.getLength());
terminal.println();
}
// Ensure everything is sent
terminal.flush();
}