I'm encountering an "Assertion failed" error when compiling my Arduino sketch. I've reset the IDE settings but the issue persists. I'm not using external libraries and I'm on the latest Arduino IDE version for macOS. Any ideas?
Error message:
assertion failed [header->version <= kProjectSourceVersion]: runtime library is newer than runtime
(Library.cpp:99 init)
signal: trace/BPT trap
/*------- Hardware configuration -------*/
const int redPin = 2; // pin red LED is attached to
const int greenPin = 3; // pin for green LED
const int bluePin = 4; // pin for blue LED
const byte debugPin = 13; // pin that we put debug output on (set to 255 to disable)
// (most Arduino's have a built in LED on pin 13...)
/*-------------------------------------------*/
/* Initializization code (run once via call from Arduino framework) */
void setup() {
// establish direction of pins we are using to drive LEDs
pinMode(redPin, OUTPUT);
pinMode(greenPin, OUTPUT);
pinMode(bluePin, OUTPUT);
pinMode(debugPin, OUTPUT);
}
/* Main routine (called repeated by from the Arduino framework) */
void loop() {
// For this version we just flash the LEDs one after the other...
// Turn LED on by setting corresponding pin voltage high
digitalWrite(debugPin,HIGH);
// Delay here (leaving the LED on) for 250msec (1/4 sec)
delay(250);
// Turn it off
digitalWrite(debugPin,LOW);
// Do that again for the red (1x), green (2x) and blue (3x) ones in sequence
digitalWrite(redPin,HIGH); delay(250); digitalWrite(redPin,LOW);
delay(500);
digitalWrite(greenPin,HIGH); delay(250); digitalWrite(greenPin,LOW); delay(250);
digitalWrite(greenPin,HIGH); delay(250); digitalWrite(greenPin,LOW);
delay(500);
digitalWrite(bluePin,HIGH); delay(250); digitalWrite(bluePin,LOW); delay(250);
digitalWrite(bluePin,HIGH); delay(250); digitalWrite(bluePin,LOW); delay(250);
digitalWrite(bluePin,HIGH); delay(250); digitalWrite(bluePin,LOW);
// All LEDs are now off, stay dark for 1/2 sec
delay(500);
} // end loop()