Saving data to the my hardware thru the Terminal Widget

I have gotten the Terminal widget to work in a basic sense, but I want to use it to be able to send data to the hardware to be saved in EEPROM. Like my auth code, wifi SSID and password, etc. So it I ever need to change these, I can. So for starters, my auth code, here’s what I started with:
BLYNK_WRITE(V12) { //terminal on V12
if (String(“auth”) == param.asStr()) { //get new auth key
terminal.println(F(“Input new auth key now:”)) ;
}

So once I type ‘auth’ into the terminal, it’ll know the next string I type will be the auth key. But how do I wait for the next data from the terminal?

The terminal widget is just that a terminal, with the same resulting string of text as would be from a IDE Serial Monitor… so what you want can be Googled as a standard Serial parsing type question… aka programming 101

BTW, this is usually handled by something like WiFi manager (search for that)… the way you are trying is not likely to work as easily and not at all of you have already moved the device into a new WiFi area as the App would not be able to connect to it to get the new info from the terminal… thus needing predetermined info and again, easier to deal with that with WiFi manager.

1 Like
2 Likes