From e9fdb0aeb95b7a1752420c15c3699d8a60dcdbb0 Mon Sep 17 00:00:00 2001 From: Teemu Toivola Date: Sun, 18 Nov 2018 20:13:58 +0200 Subject: [PATCH] move externalLight to Settings.h to allow more obvious way for disabling the use of the built-in led without having to modify the board physically --- printermonitor/Settings.h | 5 ++++- printermonitor/printermonitor.ino | 5 +---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/printermonitor/Settings.h b/printermonitor/Settings.h index 5cd795c..dfab667 100644 --- a/printermonitor/Settings.h +++ b/printermonitor/Settings.h @@ -84,10 +84,13 @@ 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 +// LED Settings +const int externalLight = LED_BUILTIN; // Set to unused pin, like D1, to disable use of built-in LED (LED_BUILTIN) + boolean ENABLE_OTA = true; // this will allow you to load firmware to the device over WiFi (see OTA for ESP8266) String OTA_Password = ""; // Set an OTA password here -- leave blank if you don't want to be prompted for password //****************************** // End Settings //****************************** -String themeColor = "light-green"; // this can be changed later in the web interface. +String themeColor = "light-green"; // this can be changed later in the web interface. diff --git a/printermonitor/printermonitor.ino b/printermonitor/printermonitor.ino index 9914324..e5a12d4 100644 --- a/printermonitor/printermonitor.ino +++ b/printermonitor/printermonitor.ino @@ -155,9 +155,6 @@ String COLOR_THEMES = "" ""; -// Change the externalLight to the pin you wish to use if other than the Built-in LED -int externalLight = LED_BUILTIN; // LED_BUILTIN is is the built in LED on the Wemos - void setup() { Serial.begin(115200); SPIFFS.begin(); @@ -1129,4 +1126,4 @@ void enableDisplay(boolean enable) { Serial.println("Display was turned OFF: " + timeClient.getFormattedTime()); displayOffEpoch = lastEpoch; } -} +}