My device is disconnected still it is showing online on dashboard? and it's is show offline after 5-10 minutes?

my code is-

#define BLYNK_PRINT Serial

#include <BlynkSimpleEsp8266.h>

#include <Servo.h>

#define BLYNK_AUTH_TOKEN "2T-Iv5jVEBwrvW7zfwLkFnXnyspPSD3W" //Enter your blynk auth token

char auth[] = BLYNK_AUTH_TOKEN;

char ssid[] = "realme 5i";//Enter your WIFI name

char pass[] = "ssssssss";//Enter your WIFI password

Servo motor1;

Servo motor2;

Servo motor3;

Servo motor4;

int motor1Pin = 0; // Pin for motor 1

int motor2Pin = 1; // Pin for motor 2

int motor3Pin = 2; // Pin for motor 3

int motor4Pin = 4; // Pin for motor 4

int motor1Speed = 0; // Speed of motor 1

int motor2Speed = 0; // Speed of motor 2

int motor3Speed = 0; // Speed of motor 3

int motor4Speed = 0; // Speed of motor 4

void setup() {

  motor1.attach(motor1Pin);

  motor2.attach(motor2Pin);

  motor3.attach(motor3Pin);

  motor4.attach(motor4Pin);

  Blynk.begin(auth, ssid, pass, "blynk.cloud", 80);

}

void loop() {

  Blynk.run();

}

BLYNK_WRITE(V1) {

    motor1Speed = param[0].asInt();

    motor1Speed = map(motor1Speed, 0, 1023, 1000, 2000);

    motor1.writeMicroseconds(motor1Speed);

}

BLYNK_WRITE(V2) {

    motor2Speed = param[0].asInt();

    motor2Speed = map(motor2Speed, 0, 1023, 1000, 2000);

    motor2.writeMicroseconds(motor2Speed);

}

BLYNK_WRITE(V3) {

    motor3Speed = param[0].asInt();

    motor3Speed = map(motor3Speed, 0, 1023, 1000, 2000);

    motor3.writeMicroseconds(motor3Speed);

}

BLYNK_WRITE(V4) {

    motor4Speed = param[0].asInt();

    motor4Speed = map(motor4Speed, 0, 1023, 1000, 2000);

    motor4.writeMicroseconds(motor4Speed);

}

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: ```

1 Like
#define BLYNK_PRINT Serial
#include <BlynkSimpleEsp8266.h>
#include <Servo.h>
#define BLYNK_AUTH_TOKEN "2T-Iv5jVEBwrvW7zfwLkFnXnyspPSD3W" //Enter your blynk auth token

char auth[] = BLYNK_AUTH_TOKEN;
char ssid[] = "--0----";//Enter your WIFI name
char pass[] = "---------";//Enter your WIFI password

Servo motor1;
Servo motor2;
Servo motor3;
Servo motor4;


int motor1Speed = 0; // Speed of motor 1
int motor2Speed = 0; // Speed of motor 2
int motor3Speed = 0; // Speed of motor 3
int motor4Speed = 0; // Speed of motor 4

void setup() {
  motor1.attach(D0);
  motor2.attach(D1);
  motor3.attach(D2);
  motor4.attach(D4);
  Blynk.begin(auth, ssid, pass, "blynk-cloud.com", 8442);
}

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

BLYNK_WRITE(V1) {
    motor1Speed = param[0].asInt();
    motor1Speed = map(motor1Speed, 0, 1023, 1000, 2000);
    motor1.writeMicroseconds(motor1Speed);
}

BLYNK_WRITE(V2) {
    motor2Speed = param[0].asInt();
    motor2Speed = map(motor2Speed, 0, 1023, 1000, 2000);
    motor2.writeMicroseconds(motor2Speed);
}

BLYNK_WRITE(V3) {
    motor3Speed = param[0].asInt();
    motor3Speed = map(motor3Speed, 0, 1023, 1000, 2000);
    motor3.writeMicroseconds(motor3Speed);
}

BLYNK_WRITE(V4) {
    motor4Speed = param[0].asInt();
    motor4Speed = map(motor4Speed, 0, 1023, 1000, 2000);
    motor4.writeMicroseconds(motor4Speed);
}

@sj0091 please don’t create multiple topics on the same subject and keep the discussion in one place.

1 Like

sure that’s my bad!