I have a couple questions about using virtual pins:
I used virtual pins to display the date and time from my device. But since I’ll also activated the DB I’m finding date and time data the isn’t necessary and will have to be deleted server side. Is there some other way to display the date and time in a ‘label widget’? Or not physically write the records?
I’m finding the need to change email address used in alerts without having to compile firmware each time.
So I came up with the following workaround:
1.Did INSERT in Blynk datebase table to save the email address for pin 30.
2.added code below to device program
eMail1 = param.asString();
then in Setup addded
How do I get the virtual pin’s string value of a non-widget pin?
Stored email address in V30 and want to get the ‘stringvalue’ from the server. Everything I tried gets nothing.
Also not sure I understand what the BLYNK_VIRTUALWRITE does? Read from server or write to sever? ASSUMMING that it’s write to the server so that Blynk UI can use it. Am I correct? If so how can I have it only write ONE record to the DB. I using a Vpin to sending the date and time to UI and am seeing multiple DB records each time is is updated
Not sure what you mean… perhaps you mean physical pin on the MCU? If so, you would use digitalRead() or analogRead() in this method:
If by UI you mean the App, then yes, that is how you send data from Device (sketch) to App (Display Widget). I am not positive concerning the DB, but I am guessing if you have the DB active, then it records all virtual pin data; I am unsure if you can pick and chose.