Dear Pete
I am trying to design a smart parking system using blynk 2.0
I am receiving the following error on blynk 2.0
receiving the error [415154] Connecting to blynk-cloud.com:80
I have attached the code below.
@vijaysiva 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.
However, when you’ve made that change you sketch won’t work as I suspect you are hoping it will.
void setup only executes once, so the IR sensor will be read just once - when the device boots. In addition, placing a Blynk.virtualWrite in void setup almost certainly won’t write the data to Blynk because although Blynk.begin() has executed Blynk.connected() is not yet true.
And, don’t be tempted to place the IR code that’s currently in void setup into the void loop, this breaks the #1 rule of Blynk.
Instead, you need to set-up a BlynkTimer to call a function on a regular basis and put your IR code in there.
I’m also a bit confused about why this is an IR sensor. If you’re attempting to figure out if a vehicle is parked in a space then why not use a simple LDR, Photodiode or luminance sensor?