can use OLED (ssd1306) display with esp32 too

This commit is contained in:
fx2 2022-11-07 14:01:32 +01:00
parent ac5e5f9277
commit 0b32cab7a4
2 changed files with 21 additions and 1 deletions

View file

@ -36,7 +36,9 @@ app::app() {
}
#ifdef ENA_SSD1306
SSD1306Wire display(0x3c, 4, 5);
/* esp8266 : SCL = 5, SDA = 4 */
/* ewsp32 : SCL = 22, SDA = 21 */
SSD1306Wire display(0x3c, SDA, SCL);
static unsigned char bmp_arrow[] PROGMEM = {
B00000000, B00011100, B00011100, B00001110, B00001110, B11111110, B01111111,

View file

@ -144,3 +144,21 @@ monitor_filters =
;default ; Remove typical terminal control codes from input
time ; Add timestamp with milliseconds for each new line
log2file ; Log data to a file “platformio-device-monitor-*.log” located in the current working directory
[env:esp32-wroom32-ssd1306]
platform = espressif32
board = lolin_d32
build_flags = -D RELEASE -std=gnu++14 -DENA_SSD1306
build_unflags = -std=gnu++11
monitor_filters =
;default ; Remove typical terminal control codes from input
time ; Add timestamp with milliseconds for each new line
;log2file ; Log data to a file “platformio-device-monitor-*.log” located in the current working directory
lib_deps =
https://github.com/yubox-node-org/ESPAsyncWebServer
nrf24/RF24
paulstoffregen/Time
knolleary/PubSubClient
bblanchon/ArduinoJson
https://github.com/ThingPulse/esp8266-oled-ssd1306.git