#include "RGBLed.h"
RGBLed led(12, 13, 14, RGBLed::COMMON_ANODE);
#include <Adafruit_SSD1306.h>
#define SCREEN_WIDTH 128 // OLED display width, in pixels
#define SCREEN_HEIGHT 64 // OLED display height, in pixels
#define OLED_RESET -1 // Reset pin # (or -1 if sharing Arduino reset pin)
#define SCREEN_ADDRESS 0x3C ///< See datasheet for Address; 0x3D for 128x64, 0x3C for 128x32
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);
void setup() {
Serial.begin(115200);
if(!display.begin(SSD1306_SWITCHCAPVCC, SCREEN_ADDRESS)) {
Serial.println(F("SSD1306 allocation failed"));
for(;;); // Don't proceed, loop forever
}
display.clearDisplay();
}
void loop() {
display.setTextSize(1);
display.setTextColor(1);
display.setCursor(0,0);
display.println(F("Hello, world!"));
display.display();
led.brightness(RGBLed::GREEN, 100);
delay(2000);
led.brightness(RGBLed::GREEN, 0);
delay(2000);
}