Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to use Text Value Display
#2
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.


    }
   
    }
}
Reply


Messages In This Thread
How to use Text Value Display - by Nils.Sky - 01-31-2023, 05:32 PM
RE: How to use Text Value Display - by iliaslamprou - 01-31-2023, 07:43 PM
RE: How to use Text Value Display - by Nils.Sky - 02-01-2023, 12:15 PM
RE: How to use Text Value Display - by Nils.Sky - 02-03-2023, 02:11 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)