Asking the error in program (compilation error)

I'm doing a small project 'Automatic fish food feeder' using blynk. I write a code for this. But earlier it works good but now when I try to run it, it shows compilation error. It is not including where the error is occuring. It just showing...
"exit status 1

Compilation error: exit status 1"

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

Servo servo;

char auth[] = "xxxx";
char ssid[] = "xxxx";
char pass[] = "xxxx";

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

void loop() {
    Blynk.run();

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

Please help me to find the error in this program.

It shows more. You may have to scroll up.

You can adjust the compiler-log to show much much more info by applying the Arduino-IDE adjustements described in this tutorial

This error is occurring because you did not define
nor BLYNK_TEMPLATE_ID
nor BLYNK_TEMPLATE_NAME

Fill in your details and test the code below.

I commented on lines 25 to 27 because it also gives a compilation error and it is because you create a function within the loop() function.

#include <Servo.h>
#define BLYNK_PRINT Serial

#define BLYNK_TEMPLATE_ID           "TMPxxxxxx"
#define BLYNK_TEMPLATE_NAME         "Device"

#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>

Servo servo;

char auth[] = "xxxx";
char ssid[] = "xxxx";
char pass[] = "xxxx";

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

void loop() {
    Blynk.run();

   // BLYNK_WRITE(V0){
   //     servo.write(param.asInt());
   // }
}

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.