1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-12-24 21:21:24 +01:00

Fix auto-configure from cold boot.

Add call to Wire.begin().
This commit is contained in:
Neil McKechnie 2021-02-17 11:06:26 +00:00
parent 4647568b8d
commit 0d877a3d1b

View File

@ -21,7 +21,7 @@
// Note: this file is optionally included by LCD_Implementation.h // 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. // 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" #include "SSD1306/SSD1306AsciiWire.h"
SSD1306AsciiWire LCDDriver; SSD1306AsciiWire LCDDriver;
@ -29,6 +29,7 @@ SSD1306AsciiWire LCDDriver;
LCDDisplay::LCDDisplay() { LCDDisplay::LCDDisplay() {
// Scan for device on 0x3c and 0x3d. // Scan for device on 0x3c and 0x3d.
Wire.begin();
for (byte address=0x3c; address<=0x3d; address++) { for (byte address=0x3c; address<=0x3d; address++) {
Wire.beginTransmission(address); Wire.beginTransmission(address);
byte error = Wire.endTransmission(); byte error = Wire.endTransmission();