From 4feb52b748210ba99cf9e4c5b2ce2a4f42a1abad Mon Sep 17 00:00:00 2001 From: Chrome Legion Date: Sun, 27 May 2018 22:11:48 -0700 Subject: [PATCH] Qrome - added the ability to flip the rotation of the display --- printermonitor/Settings.h | 1 + printermonitor/printermonitor.ino | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/printermonitor/Settings.h b/printermonitor/Settings.h index 0c973b2..78c88b5 100644 --- a/printermonitor/Settings.h +++ b/printermonitor/Settings.h @@ -69,6 +69,7 @@ boolean DISPLAYCLOCK = true; // true = Show Clock when not printing / false = const int I2C_DISPLAY_ADDRESS = 0x3c; // I2C Address of your Display (usually 0x3c or 0x3d) const int SDA_PIN = D2; const int SCL_PIN = D5; +const boolean INVERT_DISPLAY = false; // true = pins at top | false = pins at the bottom //#define DISPLAY_SH1106 // Uncomment this line to use the SH1106 display -- SSD1306 is used by default and is most common boolean ENABLE_OTA = true; // this will allow you to load firmware to the device over WiFi (see OTA for ESP8266) diff --git a/printermonitor/printermonitor.ino b/printermonitor/printermonitor.ino index cdf0628..9af964a 100644 --- a/printermonitor/printermonitor.ino +++ b/printermonitor/printermonitor.ino @@ -27,7 +27,7 @@ SOFTWARE. #include "Settings.h" -#define VERSION "1.4" +#define VERSION "1.5" #define HOSTNAME "OctMon-" #define CONFIG "/conf.txt" @@ -154,6 +154,9 @@ void setup() { // initialize dispaly display.init(); + if (INVERT_DISPLAY) { + display.flipScreenVertically(); // connections at top of OLED display + } display.clear(); display.display(); @@ -195,6 +198,9 @@ void setup() { // Inital UI takes care of initalising the display too. ui.init(); + if (INVERT_DISPLAY) { + display.flipScreenVertically(); //connections at top of OLED display + } // print the received signal strength: Serial.print("Signal Strength (RSSI): ");