Cannot Connect Blynk-cloud in Blynk App

Hi @Pavel i now workout on nodeMcu with ultrasonic sensor, i still fail to connect to blynk cloud. as in my blynk app always said my project was’t not online. Can you help me ? i need to get data from ultrasonic sensor to blynk app. tq .

I merged your multiple posts into this topic.

Have you read through the Documentation, Help Files and looked at the example files?

You left in your AUTH code, that others here CAN use to mess with your project, but removed your WiFi and SSID, that we CANNOT use… unless we live next door :stuck_out_tongue: … so I am unsure if you had actually entered them or not in the sketch that you uploaded to your NodeMCU?

I would also recommend searching this forum for keywords like ultrasonic? I know I made a basic example for one.

Hi there, i have the same problem cannot connect to wifi… but i dun install any cayeene libraries. Pls help me…

Please don’t create new topics for same issue, I moved your post back here… follow the suggestions already supplied and show us what you have tried and the results.

I tried this code to display ultrasonic sensor distance into LCD widget in blynk. but i it failed to to connect with my wifi (i use hotspot). I get this

#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
#include <SimpleTimer.h>
//#include <Ultrasonic.h> //HC-SR04

#define ECHOPIN D2

long duration;
int distance;

// You should get Auth Token in the Blynk App. // Go to the Project Settings (nut icon). 
char auth[] = "";

// Your WiFi credentials. // Set password to "" for open networks.

const char ssid[] = "";
const char pass[] = "";

WidgetLCD lcd(V1);

void setup() {
// Debug console

Blynk.begin(auth, ssid, pass);

// You can also specify server: //Blynk.begin(auth, ssid, pass, "", 8442); //Blynk.begin(auth, ssid, pass, IPAddress(192,168,43,88), 8443);

lcd.clear(); //Use it to clear the LCD Widget
lcd.print(0, 0, "Distance in cm"); // use: (position X: 0-15, position Y: 0-1, "Message you want to print") // Please use timed events when LCD printing in void loop to avoid sending too many commands // It will cause a FLOOD Error, and connection will be dropped 

void loop() {

lcd.print(0, 0, "Distance in cm"); // use: (position X: 0-15, position Y: 0-1, "Message you want to print") long duration, distance;

digitalWrite(TRIGGERPIN, LOW);

digitalWrite(TRIGGERPIN, HIGH);

digitalWrite(TRIGGERPIN, LOW);
duration = pulseIn(ECHOPIN, HIGH);
distance = (duration/2) / 29.1;


lcd.print(7, 1, distance);;



When posting code here please follow the guidelines in the Welcome Topic… I edited your post to show how it is done.


You code, particularly the void loop() is NOT Blynk friendly… here is a document about that.

Then look at the link I already provided above (the green word ultrasonic) that shows how others learned to use an ultrasonic sensor with Blynk effectively.

@Fatina_Aisya If you haven’t already found it with the recommended search… I also have a ultrasonic example you can try. It will work just fine without a physical servo attached.

I think my ultimate problem is do i need to change any of the details from folder " Blynk > Script > blynk-ser" ?
As i watch a tutorial to connect blynk app i need to change the ip address ?

Is this the main problem why i cannot connect to blynk-cloud?
Another confusion is i check my ip address sometime it change from to

Please help me. i really a beginner with this apps… i need to finish my final year project… Tq sir…

Based on the sketch you showed, you are using an ESP8266 with WiFi… so why are you trying to use the blynk-ser script for the USB link? That is for when using a basic Arduino like an UNO that has no WiFi abilities.

Based on the sketch you showed, you are using an ESP8266 with WiFi… so why are you trying to use the blynk-ser script for the USB link? That is for when using a basic Arduino like an UNO that has no WiFi abilities.

So, thats means i dun have to make any changes in that scripts? Tq sir for help me…

I have no idea what you are trying to use for hardware, or what you are trying to do with it… so I can’t really answer.

Basically, i want to get distance of the ultrasonic sensor data to be displayed in LCD widget of Blynk App.
I managed to display the distance in the serial monitor but i do not know how to display in LCD blynk app…


I manage to solve…

What is the different between blynk-cloud and local server?
as far as i understand, local server is different from blynk-cloud so is that means i cannot connect my blynk app with wifi ? and if i connect my app to blynk- cloud i cannot get 100000 energy ?

Good to see… markig this topic solved.

The cloud server is easily accessible around the world… the “cost” of Blynk energy helps toward the cost of the servers. The benefit of the cloud is simplicity… nothing for you or I to setup aside from creating an account.

Do not worry so much about the energy… trust me, I do a lot of stuff with Blynk… but even if I used the cloud server, I highly doubt that I have used more than a total of $50 of energy over the last two years (I have spent more on coffee)… Most of that “energy” is sitting around in unused experiment projects that a normal cloud user would simply recycle for more active projects. Blynk Cloud is very cost effective.

A local Server is essentially the same concept, but can be installed on your own hardware… It is considered an advanced process, so yes, you can control the energy but you also have to regularly update, maintain and configure the Local Server, as well as setup your own network in order to do more than just use it on your own WiFi.

Something to consider… a server is an independent entity from all other servers… so for example even though one can have both a Cloud and Local Server account with same login info, they are not cross compatible. Each server controls the creation and usage of AUTH tokens for it’s own accounts and projects.

EDIT - you can clone projects from one to the other… you just have to generate new AUTHs and update the sketch with such, and connect to the correct server.

@Fatina_Aisya Blynk is also offering 30% off their XL Energy pack up to the 3rd January.

Wahh… @Costas really?!
Tq for the info…

I understand now… Tq so much for sharing knowledge… really excited to complete my project i want to share once im complete my project.

Fatina what project u create using blynk? We can share knowledge…

HI @shah5109 :grinning:,
Im currently working on checking the dustbin using ultrasonic sensor to sent data thru nodemcu and notify the cleaner if the dustbin is full…
How about you ? what kind of project are u working right now?

@Fatina_Aisya im creating door unlock project using voice, wifi button, gsm, bluetooth and keypad… alhamdulillah its done as my final year project… most of it im using blynk