01-31-2023, 07:43 PM
Hi,
first of all the code needs this correction here
void onReceived(char variableType, uint8_t variableIndex, String valueAsText){
if (variableType=='V'){
// float value = valueAsText.toFloat();
if (variableIndex<V_memory_count) {
float value = valueAsText.toFloat();
V[variableIndex]=value;
}
else if (variableIndex==32) text1=valueAsText; // V32 -> Text
else if (variableIndex==33) text2=valueAsText; // V33 -> Text
// else if (variableIndex==34) text3=valueAsText; // V34 ->Text
}
}
}
No, you don't need to do something else.
Now you have to see the message "Hello" on the "Text Value Display" in case you have selected the variable V32.
Every time the app requested for the V12 the function "onRequested" returns the "text1"
On the loop code you can change the text of this variable every time you want to change the displayed message.
}
}
}
first of all the code needs this correction here
void onReceived(char variableType, uint8_t variableIndex, String valueAsText){
if (variableType=='V'){
// float value = valueAsText.toFloat();
if (variableIndex<V_memory_count) {
float value = valueAsText.toFloat();
V[variableIndex]=value;
}
else if (variableIndex==32) text1=valueAsText; // V32 -> Text
else if (variableIndex==33) text2=valueAsText; // V33 -> Text
// else if (variableIndex==34) text3=valueAsText; // V34 ->Text
}
}
}
No, you don't need to do something else.
Now you have to see the message "Hello" on the "Text Value Display" in case you have selected the variable V32.
Every time the app requested for the V12 the function "onRequested" returns the "text1"
On the loop code you can change the text of this variable every time you want to change the displayed message.
}
}
}