mirror of
https://git.mirrors.martin98.com/https://github.com/luc-github/ESP3D.git
synced 2025-08-03 04:50:37 +08:00
Added support for SH1106
OLED_DISPLAY_SH1106
This commit is contained in:
parent
f24dfe9d23
commit
a43eaa6d64
@ -114,10 +114,11 @@
|
||||
#define ESP_DHT_PIN 2
|
||||
#endif
|
||||
|
||||
//Pins where the screen is connected
|
||||
//Pins where the screen is connected
|
||||
#ifdef ESP_OLED_FEATURE
|
||||
#define OLED_PIN_A 4
|
||||
#define OLED_PIN_B 15
|
||||
#define OLED_DISPLAY_SH1106 // OLED Display Type: SSD1306(OLED_DISPLAY_SSD1306) / SH1106(OLED_DISPLAY_SH1106), comment this line out to disable oled
|
||||
#define OLED_PIN_A 5 //5 //SDA; // i2c SDA Pin
|
||||
#define OLED_PIN_B 4 //4 //SCL; // i2c SCL Pin
|
||||
#define OLED_ADDR 0x3c
|
||||
#define HELTEC_EMBEDDED_PIN 16 //0 to disable
|
||||
#define OLED_FLIP_VERTICALY 1 //0 to disable
|
||||
|
@ -20,9 +20,24 @@
|
||||
#include "config.h"
|
||||
#ifdef ESP_OLED_FEATURE
|
||||
#include "esp_oled.h"
|
||||
#include "SSD1306.h"
|
||||
#include "Wire.h"
|
||||
SSD1306 esp_display(OLED_ADDR, OLED_PIN_A, OLED_PIN_B);
|
||||
|
||||
|
||||
// Initialize the OLED display using I2C
|
||||
#ifdef OLED_DISPLAY_SSD1306
|
||||
#include "SSD1306.h" // alias for `#include "SSD1306Wire.h"`
|
||||
#elif defined OLED_DISPLAY_SH1106
|
||||
#include "SH1106.h" // alias for `#include "SH1106Wire.h"`
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef OLED_DISPLAY_SSD1306
|
||||
SSD1306 esp_display(0x3c, OLED_PIN_A, OLED_PIN_B);
|
||||
#elif defined OLED_DISPLAY_SH1106
|
||||
SH1106 esp_display(0x3c, OLED_PIN_A, OLED_PIN_B);
|
||||
#endif
|
||||
|
||||
|
||||
#define ESP3D_Logo_width 62
|
||||
#define ESP3D_Logo_height 45
|
||||
const char ESP3D_Logo[] PROGMEM = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user