mirror of
https://git.mirrors.martin98.com/https://github.com/luc-github/ESP3D.git
synced 2025-08-03 06:30:38 +08:00
Added support for SH1106
OLED_DISPLAY_SH1106
This commit is contained in:
parent
f24dfe9d23
commit
a43eaa6d64
@ -116,8 +116,9 @@
|
|||||||
|
|
||||||
//Pins where the screen is connected
|
//Pins where the screen is connected
|
||||||
#ifdef ESP_OLED_FEATURE
|
#ifdef ESP_OLED_FEATURE
|
||||||
#define OLED_PIN_A 4
|
#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_B 15
|
#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 OLED_ADDR 0x3c
|
||||||
#define HELTEC_EMBEDDED_PIN 16 //0 to disable
|
#define HELTEC_EMBEDDED_PIN 16 //0 to disable
|
||||||
#define OLED_FLIP_VERTICALY 1 //0 to disable
|
#define OLED_FLIP_VERTICALY 1 //0 to disable
|
||||||
|
@ -20,9 +20,24 @@
|
|||||||
#include "config.h"
|
#include "config.h"
|
||||||
#ifdef ESP_OLED_FEATURE
|
#ifdef ESP_OLED_FEATURE
|
||||||
#include "esp_oled.h"
|
#include "esp_oled.h"
|
||||||
#include "SSD1306.h"
|
|
||||||
#include "Wire.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_width 62
|
||||||
#define ESP3D_Logo_height 45
|
#define ESP3D_Logo_height 45
|
||||||
const char ESP3D_Logo[] PROGMEM = {
|
const char ESP3D_Logo[] PROGMEM = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user