I have a NodeMCU module in my project.
I also have an Arduino Mega where the inputs are physically connected to the outputs of the NodeMCU. For me it was the easiest way to implement it (Yes I know I could have solved it differently). Now I have a button in the Blynk app that starts the programm.I also have a hardware button in my project that can start the same program. In the programm I ask per “If then” statement if either the NodeMCU module with blynk gives a high or if the hardware button gives a high. Now the problem is, that if the NodeMCU with Blynk is not connected to the internet the programme starts. So I think the error must be that the NodeMCU without internet connection always sets a HIGH on the output, can I avoid or change this?
I was not able to upload the code because when posting it said, that i cant add more than 2 links but i used the Blynk Blink examplecode in the Examplebrowser
That’s because you are t posting your code correctly. Code needs to be placed between triple backticks, as explained when you created your post.
Triple backticks look like this:
```
We really need to see your code, and need a detailed explanation of which pins you are referring to. If you’re using digital pins rather than virtual pins we also need to see your app in stopped (edit) moose so that we can see which pins are connected to which widgets.
If you are using digital pins then swapping to virtual pins should be your first task.
Good afternoon, excuse my late reply.
I have attached my code below. There is only one button in the blink app which switches the digital output “D3”. But as long as it is not connected via Wifi, I get a HIGH on this output. I want the output to be LOW and only switch to HIGH when I enter this in the app, even before the NodeMCU module is connected to the Wifi.
Could I query the connection status in the void loop with an IF and activate the Blynk.run(); if the connection is successful? (How can I check the connection status if possible?) additionally I would set my outputs to LOW in the void setup. I have also attached my improvement as code.