From 0d877a3d1be5362331a7fae30e30071c43348c7c Mon Sep 17 00:00:00 2001 From: Neil McKechnie Date: Wed, 17 Feb 2021 11:06:26 +0000 Subject: [PATCH] Fix auto-configure from cold boot. Add call to Wire.begin(). --- LCD_OLED.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/LCD_OLED.h b/LCD_OLED.h index a635fb4..a13a1cb 100644 --- a/LCD_OLED.h +++ b/LCD_OLED.h @@ -21,7 +21,7 @@ // Note: this file is optionally included by LCD_Implementation.h // It is NOT a .cpp file to prevent it being compiled and demanding libraries even when not needed. -#include "SSD1306/SSD1306Ascii.h" +#include "Wire.h" #include "SSD1306/SSD1306AsciiWire.h" SSD1306AsciiWire LCDDriver; @@ -29,6 +29,7 @@ SSD1306AsciiWire LCDDriver; LCDDisplay::LCDDisplay() { // Scan for device on 0x3c and 0x3d. + Wire.begin(); for (byte address=0x3c; address<=0x3d; address++) { Wire.beginTransmission(address); byte error = Wire.endTransmission();