Error compiling program to nodemcu Amcica

I get this error while trying to verify my code for the nodemcu

exit status 1
Fout bij het compileren voor board NodeMCU 1.0 (ESP-12E Module)

I know the problem has probably something to do with the libraries but i can't figure it out.

#include <analogWrite.h>
#include <PID_v1.h>
#define BLYNK_PRINT Serial 
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>

char auth[] = "xxxxxxxxx"; 
char ssid[] = "yyyyyyyyyyy"; 
char pass[] = "zzzzzzzzzz"; 
int sensor[5]; //maak een array met 5 variabelen 
int gewenste_snelheid = 100; 
int PWM_links = D3; // pwm h-brug links 
int PWM_rechts = D4; //pwm h-brug rechts 

int snelheid_links; // snelheid linker motor 
int snelheid_rechts;// snelheid rechter motor 

int DIR_links = A0; //direction pin h-brug links 
int DIR_rechts = D0;//direction pin h-brug rechts

void lees_sensorwaarden(void); 
void bereken_PID(void);
void motor_control(void); 

double Kp = V0, Ki = V1, Kd = V2;
double Setpoint, Input, PID_waarde; 
int error; 
PID myPID(&Input, &PID_waarde, &Setpoint, Kp, Ki, Kd, DIRECT); 
BLYNK_WRITE(V0) //Geeft Kp, Ki, Kd, de waarden die in de Blynk app ingevoerd worden
{ 
int Kp = param.asInt(); 
} 
BLYNK_WRITE(V1) 
{ 
int Ki = param.asInt(); 
} 
BLYNK_WRITE(V2) 
{ 
int Kd = param.asInt(); 
} 

void setup() { 
pinMode(D1, INPUT); 
pinMode(D2, INPUT); 
pinMode(D5, INPUT); 
pinMode(D6, INPUT); 
pinMode(D7, INPUT); 

pinMode(PWM_links, OUTPUT); //PWM Pin Links 
pinMode(PWM_rechts, OUTPUT); //PWM Pin Rechts 
pinMode(DIR_links, OUTPUT); //DIR Links 
pinMode(DIR_rechts, OUTPUT); //DIR rechts 
Input = error; 
Setpoint = 0; 
myPID.SetMode(AUTOMATIC); //PID regelaar aanzetten

// Debug console 
Serial.begin(9600); 
Blynk.begin(auth, ssid, pass); //verbind met de Blynk server via internet 
} 

void loop(){ 
Blynk.run(); 
lees_sensorwaarden(); 
bereken_PID(); 
motor_control();
} 
void lees_sensorwaarden() 
{ 
sensor[1] = digitalRead(D1); 
sensor[2] = digitalRead(D2); 
sensor[3] = digitalRead(D5); 
sensor[4] = digitalRead(D6);
sensor[5] = digitalRead(D7); 

  if ((sensor[1] == 1) && (sensor[2] == 1) && (sensor[3] == 1) && (sensor[4] == 1) && (sensor[5] == 0))
    error = 4;
  else if ((sensor[1] == 1) && (sensor[2] == 1) && (sensor[3] == 1) && (sensor[4] == 0) && (sensor[5] == 0))
    error = 3;
  else if ((sensor[1] == 1) && (sensor[2] == 1) && (sensor[3] == 1) && (sensor[4] == 0) && (sensor[5] == 1))
    error = 2;
  else if ((sensor[1] == 1) && (sensor[2] == 1) && (sensor[3] == 0) && (sensor[4] == 0) && (sensor[5] == 1))
    error = 1;
  else if ((sensor[1] == 1) && (sensor[2] == 1) && (sensor[3] == 0) && (sensor[4] == 1) && (sensor[5] == 1))
    error = 0;
  else if ((sensor[1] == 1) && (sensor[2] == 0) && (sensor[3] == 0) && (sensor[4] == 1) && (sensor[5] == 1))
    error = -1;
  else if ((sensor[1] == 1) && (sensor[2] == 0) && (sensor[3] == 1) && (sensor[4] == 1) && (sensor[5] == 1))
    error = -2;
  else if ((sensor[1] == 0) && (sensor[2] == 0) && (sensor[3] == 1) && (sensor[4] == 1) && (sensor[5] == 1))
    error = -3;
  else if ((sensor[1] == 0) && (sensor[2] == 1) && (sensor[3] == 1) && (sensor[4] == 1) && (sensor[5] == 1))
    error = -4;
  else if ((sensor[1] == 1) && (sensor[2] == 1) && (sensor[3] == 1) && (sensor[4] == 1) && (sensor[5] == 1))
    if (error == 4) error = 5;
    else if ( error == 5) error = 5;
    else error = -5;
// als geen enkele sensor de lijn ziet (van de lijn af) zal de error 5 of 5 worden afhankelijk aan welke kant de sensor het laatst gezien is
}

void bereken_PID(){
myPID.Compute(); //berekent PID_waarde
}
void motor_control() {
   // Motorsnelheid berekenen
int snelheid_links = gewenste_snelheid - PID_waarde; //PID_waarde zal negatief zijn als de error negatief is
int snelheid_rechts = gewenste_snelheid + PID_waarde;

constrain(snelheid_links, 0, 255); // begrens de snelheid tot de maximale PWM waarde
constrain(snelheid_rechts, 0, 255);

analogWrite(PWM_links, snelheid_links); //Links Motor snelheid
analogWrite(PWM_rechts, snelheid_rechts); //Rechts Motor Snelheid

digitalWrite(DIR_rechts, HIGH); // zorg dat de motoren vooruit draaien
digitalWrite(DIR_links, HIGH);
}

Please do this:

  • When you encounter an error, you'll see a button on the right side of the orange bar "Copy error messages" in the Arduino IDE (or the icon that looks like two pieces of paper at the top right corner of the black console window in the Arduino Web Editor). Click that button..
  • In a forum reply here, click on the reply field.
  • Click the </> button on the forum toolbar. This will add the forum's code tags markup to your reply.
  • Press "Ctrl + V". This will paste the error between the code tags.
  • Move the cursor outside of the code tags before you add any additional text to your reply.

If the text exceeds the forum's 9000 character limit, save it to a .txt file and podst it as an attachment. If you click the "Reply" button here, you will see an "Attachments and other settings" link.

Fout bij het compileren voor board NodeMCU 1.0 (ESP-12E Module)

Compile error for board NodeMCU 1.0 (ESP-12E Module)

I'm wondering if this is the same problem I had.

pert:
Please do this:

  • When you encounter an error, you'll see a button on the right side of the orange bar "Copy error messages" in the Arduino IDE (or the icon that looks like two pieces of paper at the top right corner of the black console window in the Arduino Web Editor). Click that button..
  • In a forum reply here, click on the reply field.
  • Click the </> button on the forum toolbar. This will add the forum's code tags markup to your reply.
  • Press "Ctrl + V". This will paste the error between the code tags.
  • Move the cursor outside of the code tags before you add any additional text to your reply.

If the text exceeds the forum's 9000 character limit, save it to a .txt file and podst it as an attachment. If you click the "Reply" button here, you will see an "Attachments and other settings" link.

Arduino: 1.8.9 (Windows 10), Board:"NodeMCU 1.0 (ESP-12E Module), 80 MHz, Flash, Disabled, 4M (no SPIFFS), v2 Lower Memory, Disabled, None, Only Sketch, 115200"

C:\Users\xxx\OneDrive\Documenten\Arduino\libraries\ESP32_AnalogWrite\analogWrite.cpp: In function 'int analogWriteChannel(uint8_t)':

C:\Users\xxx\OneDrive\Documenten\Arduino\libraries\ESP32_AnalogWrite\analogWrite.cpp:44:101: error: 'ledcSetup' was not declared in this scope

        ledcSetup(channel, _analog_write_channels[i].frequency, _analog_write_channels[i].resolution);

                                                                                                    ^

C:\Users\xxx\OneDrive\Documenten\Arduino\libraries\ESP32_AnalogWrite\analogWrite.cpp:45:35: error: 'ledcAttachPin' was not declared in this scope

        ledcAttachPin(pin, channel);

                                  ^

C:\Users\xxx\OneDrive\Documenten\Arduino\libraries\ESP32_AnalogWrite\analogWrite.cpp: In function 'void analogWrite(uint8_t, uint32_t, uint32_t)':

C:\Users\xxx\OneDrive\Documenten\Arduino\libraries\ESP32_AnalogWrite\analogWrite.cpp:104:28: error: 'ledcWrite' was not declared in this scope

    ledcWrite(channel, duty);

                           ^

exit status 1
Fout bij het compileren voor board NodeMCU 1.0 (ESP-12E Module)

Dit rapport zou meer informatie bevatten met
"Uitgebreide uitvoer weergeven tijden compilatie"
optie aan in Bestand -> Voorkeuren.

Looks like the analogWrite library is not working, if i comment it the sketch verifies, thanks. Any idea why the malfunctioning?

Please post a link (using the chain links icon on the forum toolbar to make it clickable) to where you downloaded the ESP32_AnalogWrite library from. Or if you installed it using Library Manger (Sketch > Include Library > Manage Libraries in the Arduino IDE or Libraries > Library Manager in the Arduino Web Editor) then say so and state the full name of the library.