#include #include //Select the option that matches the dimensions of the OLED U8G2_SSD1306_128X64_NONAME_F_HW_I2C DISPA(U8G2_R0, /* reset=*/ U8X8_PIN_NONE); //Pins for SDA and SCL #define SDA 4 #define SCL 5 //LED pin int LED = D9; void setup() { //LED pinMode(LED, OUTPUT); //SDA and SCL pinout pinMode(SDA, OUTPUT); pinMode(SCL, OUTPUT); // Set I2C bus speed on board and both displays Wire.setClock(100000); DISPA.setBusClock(100000); //Set I2C Adress (0x78/0x7A, or 0x3C/0x3D) of the OLED DISPA.setI2CAddress(0x78); //Turn on OLED and get it ready to accept data DISPA.begin(); //Select a font DISPA.setFont(u8g2_font_logisoso16_tf ); //Make sure the display buffer is clear DISPA.clearBuffer(); } void loop() { //Display DISPA.clearBuffer(); DISPA.setCursor(30, 20); //(X,Y) DISPA.print("Program"); DISPA.setCursor(60, 43); DISPA.print("A"); DISPA.sendBuffer(); //Command to show things on display //LED digitalWrite(LED, HIGH); delay(1000); digitalWrite(LED, LOW); delay(1000); }