From e7d5df6f4b9a5fadd22ab5a9274ee8cc04d9ff1e Mon Sep 17 00:00:00 2001 From: Julian Flake Date: Tue, 17 Mar 2020 22:31:34 +0100 Subject: [PATCH] Fix i2c address for OLED on TTGOv1 (use 0x3C instead of 0x3D) --- include/display.h | 6 +++++- src/hal/ttgov1.h | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/include/display.h b/include/display.h index 670ed30c..4d41ce08 100644 --- a/include/display.h +++ b/include/display.h @@ -8,7 +8,11 @@ // settings for oled display library #define USE_BACKBUFFER 1 #define MY_OLED OLED_128x64 -#define OLED_ADDR -1 +#ifdef MY_OLED_ADDR + #define OLED_ADDR MY_OLED_ADDR +#else + #define OLED_ADDR -1 +#endif #define OLED_INVERT 0 #define USE_HW_I2C 1 diff --git a/src/hal/ttgov1.h b/src/hal/ttgov1.h index 7d96ab54..ac906860 100644 --- a/src/hal/ttgov1.h +++ b/src/hal/ttgov1.h @@ -31,6 +31,9 @@ #define MY_OLED_SCL (15) #define MY_OLED_RST (16) +// This board reports back the wrong I2C address, so we overwrite it here +#define MY_OLED_ADDR 0x3C + // Pins for LORA chip SPI interface come from board file, we need some // additional definitions for LMIC #define LORA_IO1 (33)