Completely random failures while compiling

Can anybody please explain to me why after correctly compiling my code over 10 times then removing a library, saving it, attempting to re compile it, doesn’t compile, and then adding the removed library back, saving it and recompiling it and now it doesn’t work. Does anybody have a solution for it ?

I removed the (#include <Adafruit_BME280.h>)

#include <Arduino.h>
#include <Servo.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_BME280.h>
#include <ReefwingMPU6x00.h>
#include <SPI.h>

//BME280 sensor setup
#define BME_SCK 13
#define BME_MISO 12
#define BME_MOSI 11
#define BME_CS 10

#define SEALEVELPRESSURE_HPA (1013.25)

Adafruit_BME280 bme; // I2C
//Adafruit_BME280 bme(BME_CS); // hardware SPI
//Adafruit_BME280 bme(BME_CS, BME_MOSI, BME_MISO, BME_SCK); // software SPI

This is too general to be able to answer.

  • What exactly is not working?
  • What are the error messages?

Have you tried to clean up the project before you recompile it?

image

1 Like