Browse Source

can use OLED (ssd1306) display with esp32 too

pull/400/head
fx2 2 years ago
parent
commit
0b32cab7a4
  1. 4
      tools/esp8266/app.cpp
  2. 18
      tools/esp8266/platformio.ini

4
tools/esp8266/app.cpp

@ -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,

18
tools/esp8266/platformio.ini

@ -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
Loading…
Cancel
Save