Useful info, but looking at your sketch I see a few issues…
This i variable is re-defined (and therefore zeroed) each time the void loop executes, so it cant be used to count how many times the void loop executers (assuming that was it’s purpose)
You’re reading you’re reading your analog pin and D3 digital pin (and doing the Particle.publish thing, which I don’t really know anything about) hundreds of times per second - because that’s how fast the void loop executes)
Wouldn’t it be better to put this code in your UpdateBlynk function, so it’s only execured one per second?
I am using particle web ide and the code from 2 years ago was working great with the old Blynk. the code is below and it does not work. Can anyone see the reason not showing online on the new Blynk. Particle shows online…
@Justin_Nguyen 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:
```
Copy and paste these if you can’t find the correct symbol on your keyboard.
It has changed. These lines of code were what triggers the early bearskins of the IoT library to compile the code so that it would use the IoT servers rather than the Legacy ones. Now that the Legacy servers have been decommissioned the latest version of the Blynk library defaults to using the IoT servers, so these lines no longer need to be at the top of the sketch.
In my opinion it’s still good practice to copy/paste the three lines of firmware configuration code at the top of the sketch, except in this case, where it seems that #include <blynk.h> needs to be at the top of the sketch.