#include #include #include #define SCREEN_WIDTH 128 #define SCREEN_HEIGHT 64 // Declaration for an SSD1306 display connected to I2C (SDA, SCL pins) Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, -1); void setup() { Serial.begin(115200); if(!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) { Serial.println(F("SSD1306 allocation failed")); for(;;); } delay(2000); // Pause for 2 seconds // Clear the buffer display.clearDisplay(); /* display.drawLine(10, 16, 150, 50, WHITE); display.drawRect(10, 16, 50, 40, WHITE); display.drawRoundRect(10, 16, 50, 40, 2, WHITE); display.fillCircle(20, 32, 15, WHITE); display.fillTriangle(10, 16, 10, 30, 40, 18, WHITE); display.invertDisplay(true); */ display.display(); delay(3000); } void loop() { }