Wemos couldn't connect with Blynk app

I have connected Wemos D1 Mini with servo motor, also designed blynk app for control the movement of the servo motor and wrote code of it all things pass4ed fine until I tried to use the blynk app to control the movement of the servo , it couldn’t connect to network (Wemos Wi1fi) inside app and wrote (wasn’t online yet) so I couldn’t try blynk 4.
please there is anyone have an idea how can I solve this problem or where the problem exactly?


This is Photo for the problem in my app:


Hardware model:

Wemos . . . . servo

Gnd . . . . Brown
5V . . . . Red
D4 . . . . Yellow


This is My code:

#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
#include <Servo.h>

char auth[] = "A0BpknRKFxxagGXlkxzvuFSDX-rrOnAu"; 
char ssid[] = "sssssss"; //nama wifi
char pass[] = "12345"; //password wifi

Servo servo;

void setup() {
Serial.begin(9600);
Blynk.begin(auth, ssid, pass);
servo.attach(2);
}

void servo_via_button1() {
 int pos;
//from 0 - to 180 
 for (pos = 0; pos <= 180; pos += 1) {
   servo.write(pos);              
   delay(15);        
 }
}

void servo_via_button2() {
 int pos1;4444
//from 180 - to 0 
 for (pos1 = 180; pos1 >= 0; pos1 -= 1) {
   servo.write(pos1);            
   delay(15);              
 }
}

BLYNK_WRITE(V3) {
//servo.write(param.asInt());
 int pinValue = param.asInt();
 if (pinValue == 1) {    
   servo_via_button1();             
   Blynk.run(); 
   int pinValue = 0;  
   Blynk.syncVirtual(V3);
 }
}

BLYNK_WRITE(V4) {
 int pinValue1 = param.asInt();
 if (pinValue1 == 1) {    
   servo_via_button2();             
   Blynk.run(); 
   int pinValue1 = 0;  
   Blynk.syncVirtual(V4);
 }
}

BLYNK_WRITE(V5)
{
 servo.write(param.asInt());
}

void loop()
{
Blynk.run();
}

What does the Serial Monitor output show?

billd

connecting to {wifi_name}

before we go any further you need to do this . . .

Before creating the topic

  1. Search forum for similar topics
  2. Check http://docs.blynk.cc and http://help.blynk.cc/
  3. Add details :
    • Hardware model + communication type. For example: Arduino UNO with Ethernet Shield
    • Smartphone OS (iOS or Android) + version
    • Blynk server or local server
    • Blynk Library version
    • Add your sketch code. :point_up:Code should be formatted as example below.

Simply paste your code between ``` If you don’t format your code, your topic can be deleted by moderators.


void loop()

billd

In that case, your ssid or WiFi password are probably incorrect.
Both are case sensitive.

Pete.

I ran your sketch on Wemos D1 Mini . . . connected to WiFi first time, no problem . . . check your SSID and PW

Also

Delete the 4444 or the sketch won’t compile.

billd

How can i check what is the correct ssid or wifi pass?

Your router is the best place to look, but you could compare the SSID to the one you use in your phone to connect to your WiFi.

Pete.

Ok, I will delete it.
But I don’t know how can i check what is the correct ssid or pw

that mean ssid and password should be as my router ?

Yes, your Wemos is connecting to your router’s WiFi to get internet access.

Pete.

Thanks for everyone the problem has been solved