For my project i have used virtual pins to call the function
But instead of calling the the function just one it is recalled two time in my particle photon
For example when i try to blink an led once in the function, called through the virtual pin. it completes the cycle once and is again called. So basically the led blinks twice.
it is not running fine, just trust me on that one.
delay() is “not allowed” with Blynk.
The developers went to great time and effort to write dozens of sketches for beginners to use their system. At least one shows you how to correctly blink LEDs with Blynk.
You should add to the code block the if statement with asInt() method parameter to prevent double (twice) calling. It’s cuz, you receive data from Virtual Pin and here is need to convert to integer or receive like integer variable. For example, controlling physical GPIO18 via V3 virtual pin:
@AVicenNA please edit your post, using the pencil icon at the bottom, and add triple backticks at the beginning and end of your code so that it displays correctly.
Triple backticks look like this:
```