aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorsanni <[email protected]>2022-01-13 17:22:16 +0100
committersanni <[email protected]>2022-01-13 17:22:16 +0100
commiteabb658be8bd30fd748d78deb93bb2518cace415 (patch)
tree8aff529a263b8a6d68f68c8a1a6fdbdcb276322c
parent6a830e651d76e8d9817d1a12d46b396cca42c446 (diff)
downloadcartreader-eabb658be8bd30fd748d78deb93bb2518cace415.tar.gz
cartreader-eabb658be8bd30fd748d78deb93bb2518cace415.zip
Clear OLED screen buffer at power on and reset
-rw-r--r--Cart_Reader/Cart_Reader.ino4
-rw-r--r--Cart_Reader/options.h13
2 files changed, 11 insertions, 6 deletions
diff --git a/Cart_Reader/Cart_Reader.ino b/Cart_Reader/Cart_Reader.ino
index 8e16d0d..5efec42 100644
--- a/Cart_Reader/Cart_Reader.ino
+++ b/Cart_Reader/Cart_Reader.ino
@@ -724,7 +724,9 @@ void setup() {
display.setTextSize(1);
display.setTextColor(WHITE);
// Clear the screen buffer.
- display_Clear();
+ display.clearDisplay();
+ display.setCursor(0, 0);
+ display.display();
#endif
#ifdef enable_serial
diff --git a/Cart_Reader/options.h b/Cart_Reader/options.h
index 0931324..978e9aa 100644
--- a/Cart_Reader/options.h
+++ b/Cart_Reader/options.h
@@ -1,6 +1,10 @@
//******************************************
// !!! CHOOSE HARDWARE VERSION !!!
//******************************************
+#if !(defined(HW1) || defined(HW2) || defined(HW3) || defined(HW4) || defined(SERIAL_MONITOR))
+# error !!! PLEASE CHOOSE HARDWARE VERSION IN OPTIONS.H !!!
+#endif
+
// Remove // in front of the line with your hardware version
//#define HW4
//#define HW3
@@ -8,13 +12,12 @@
//#define HW1
//#define SERIAL_MONITOR
//******************************************
-// !!! CHOOSE HARDWARE VERSION !!!
+//
//******************************************
-#if !(defined(HW1) || defined(HW2) || defined(HW3) || defined(HW4) || defined(SERIAL_MONITOR))
-# error !!! PLEASE CHOOSE HARDWARE VERSION IN OPTIONS.H !!!
-#endif
-
+//******************************************
+// Hardware Configurations
+//******************************************
#if defined(HW4)
#define enable_LCD
#define enable_neopixel