

#include <Wire.h>
#include <Adafruit_SSD1306.h>
#include <Adafruit_GFX.h>
// OLED display TWI address
#define SCREEN_WIDTH 128 // OLED display width, in pixels
#define SCREEN_HEIGHT 64 // OLED display height, in pixels
#define OLED_RESET -1
#define OLED_ADDR 0x3C
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);
void setup() {
// initialize and clear display
display.begin(SSD1306_SWITCHCAPVCC, OLED_ADDR);
display.clearDisplay();
display.display();
delay(1000);
// display a pixel in each corner of the screen
display.drawLine(0, 0, 127, 0, WHITE);
display.drawLine(0, 0, 0, 63, WHITE);
display.drawLine(0, 63, 127, 63, WHITE);
display.drawLine(127, 63, 127, 0, WHITE);
display.drawLine(0, 10, 127, 10, WHITE);
// display a line of text
display.setTextSize(1);
display.setTextColor(WHITE);
display.setCursor(27,30);
display.print("Hello, world!");
display.setTextSize(0);
display.setCursor(10,2);
display.print("Cycle 1ere/Term SI");
delay(1000);
// update display with all of the above graphics
display.display();
}
void loop() {
// put your main code here, to run repeatedly:
}
ssd1306.pdf