The code compiles now however nothing displays. So I tried another route from Carsten4207 on the thread titled “OLED 128x64 i2c help and advice”. I’m not sure why it doesn’t display anything but for the sake of momentum I don’t care. Thanks for your help, the little guy is working and I can continue on with the project.
OLED 128x64 i2c help and advice.
#include "Adafruit_SSD1306/Adafruit_SSD1306.h"
/* ============== MAIN =====================*/
//Use I2C with OLED RESET pin on D4
#define OLED_RESET D4
Adafruit_SSD1306 oled(OLED_RESET);
unsigned long previousMillis;
unsigned long interval = 30000;
void setup() {
// by default, we'll generate the high voltage from the 3.3v line internally! (neat!)
oled.begin(SSD1306_SWITCHCAPVCC, 0x3C); // initialize with the I2C addr 0x3D (for the 128x64)
// init done
//oled.display(); // show splashscreen
Time.zone(-4);
}
void loop() {
oled.clearDisplay();
delay(200);
oled.setTextSize(2);
oled.setTextColor(WHITE);
oled.setCursor(0,0);
oled.print(Time.hourFormat12()); oled.print(":"); oled.print(Time.minute()); oled.print(":"); oled.print(Time.second());
oled.setTextColor(BLACK, WHITE); // 'inverted' text
oled.display();
delay(800);
}