In the App I use a Switch Button with the output pin V3.
Off: 0
On: 1
On the Arduinio isn’t anything esle as the ESP8266 connected yet.
My expected reaction of the Arduino would be a line at the Serial Monitor like: “Hey:0” or : “Hey:1”
Thats your issue then. While you can use that basic connection to control digital pins directly (e.g. set a button to D13 to control the built in LED). With virtual pins you will need code… however you get much more control over the long run.
EDITED OUT the rest of my preamble… the result of not reading enough of your code first
PS, in debug mode you will get that type of basic info… just not so concisely written
OK, Big OOPS … I missed the bottom of your sketch… where you DO have that function… OK, let me look closer…
I don’t understand why, but I have had some issues, at times, mixing in too much in a Serial.print() command… Split it up and also add in a Display widget V4 and a Blynk.virtualWrite() command like this:
I have duplicated your code and everything works as it should… so the issue must be on the App side.
It is almost like it is connecting to the Server… but just not the same project you are using. Double check that you are using the correct project (you can confirm the last few characters of the Auth code in the devices screen).
Perhaps even Refresh and Email the auth code again (it will be a new one), then reflash your sketch with the new code.
Also double check your Widget settings… even post screenshots of the settings here if you wish.
@Paul99 you can’t push and pull data, it’s one or the other. So change the 1s in the widget to PUSH as you are pushing the data with the virtualWrite() function in your sketch.
Well, at least we know your App is connected to the correct hardware… I believe this is your display on V4 trying to ask for data every second (1000ms)… but that is not the mode you want anyhow, so, yes, switch it to PUSH and not a timed frequency.
Based on what we have seen so far, we can conclude that your App and MCU (Arduino & ESP) are both connecting to the server and can see each other (your App probably shows the device is online and your Serial monitor did show that 1 second polling from the display before you set it to PUSH).
Incidentally, as you have your Button Widget in SWITCH mode, be aware that the display (when working correctly) will only show a state change when you actually change state. So, for example, if the button is ON when the MCU starts up, it will not know the current state of that button, until you change it again (to OFF)… there are ways around that, but first we need to get you seeing data working back and forth. Try changing the button to momentary so you can get rapid state changes to look for.
I also recommend you keep trying with a few other examples, and widgets. For example, this one will push the seconds to a display widget, set to PUSH, on V5
Thanks for your hlep.
It seems to be a serverside problem.
Now I connected my App and Arduino to a private local Server (with the same settings and code).
Until that it works.