You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
589 B
23 lines
589 B
#include <Wire.h>
|
|
#include <Adafruit_GFX.h>
|
|
#include <Adafruit_SSD1306.h>
|
|
#include "extDisplay.h"
|
|
|
|
#define EXT_DISPLAY_I2C_ADDRESS 0x3C
|
|
#define EXT_SCREEN_WIDTH 128
|
|
#define EXT_SCREEN_HEIGHT 64
|
|
|
|
|
|
Adafruit_SSD1306 extDisplay(EXT_SCREEN_WIDTH, EXT_SCREEN_HEIGHT, &Wire, -1);
|
|
|
|
void initExtDisplay() {
|
|
Wire.begin(EXT_I2C_SDA, EXT_I2C_SCL);
|
|
if(!extDisplay.begin(SSD1306_SWITCHCAPVCC, EXT_DISPLAY_I2C_ADDRESS)) {
|
|
//Serial.println("SSD1306 #1 allocation failed");
|
|
for(;;);
|
|
}
|
|
|
|
extDisplay.clearDisplay();
|
|
extDisplay.fillScreen(WHITE);
|
|
extDisplay.display();
|
|
}
|