Code to Digispark not working

hello, cant get this code to work on Dispark, any help appreciated, cheers

#include <Wire.h>
#include <Adafruit_SSD1306.h>
#include <Adafruit_GFX.h>

#define OLED_WIDTH 128
#define OLED_HEIGHT 64

#define OLED_ADDR 0x3C

Adafruit_SSD1306 display(OLED_WIDTH, OLED_HEIGHT);

void setup() {
  display.begin(SSD1306_SWITCHCAPVCC, OLED_ADDR);
}

void loop() {

display.clearDisplay();
display.drawLine(0,0,90, 30, WHITE);
display.display();
delay(2000);

display.clearDisplay();
display.drawRect(1, 1, display.width() - 2, display.height() - 2, WHITE);
display.display();
delay(2000);

display.clearDisplay();
display.drawCircle(63, 31, 20, WHITE);
display.display();
delay(2000);

display.clearDisplay();
display.drawTriangle(63, 0, 0, 63, 127, 63, WHITE);
display.display();
delay(2000);

display.clearDisplay();
display.drawRect(1, 1, display.width() - 2, display.height() - 2, WHITE);
display.display();
delay(2000);
display.fillRect(10, 10, 107, 44, WHITE);
display.display();
delay(2000);
display.drawRect(20, 20, 87, 24, BLACK);
display.display();
delay(2000);

}

Got these error;

c:\Program Files (x86)\Arduino IDE\libraries\libraries\SPI/SPI.h:303:54: error: 'SPIE' was not declared in this scope
inline static void detachInterrupt() { SPCR &= ~_BV(SPIE); }
^
c:\Program Files (x86)\Arduino IDE\libraries\libraries\SPI/SPI.h:303:54: note: suggested alternative: 'ACIE'

exit status 1

Compilation error: exit status 1

Try updating your Adafruit libraries (maybe all libraries?)
(because it compiles without error for me and I can see the OLED drawings)

You have something in your Arduino IDE misconfigured, because the line below indicated that you try to compile with standard SPI.h library rather than digispark specific.

Did you installed any Attiny core for digispark support?

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