File tree Expand file tree Collapse file tree 3 files changed +22
-5
lines changed Expand file tree Collapse file tree 3 files changed +22
-5
lines changed Original file line number Diff line number Diff line change 1
1
Thumbs.db
2
+ .DS_Store
2
3
* .orig
3
4
embedded /node_modules
4
5
embedded /dist
Original file line number Diff line number Diff line change 114
114
#define ESP_DHT_PIN 2
115
115
#endif
116
116
117
- // Pins where the screen is connected
117
+ // Pins where the screen is connected
118
118
#ifdef ESP_OLED_FEATURE
119
- #define OLED_PIN_A 4
120
- #define OLED_PIN_B 15
119
+ #define OLED_DISPLAY_SSD1306 // OLED Display Type: SSD1306(OLED_DISPLAY_SSD1306) / SH1106(OLED_DISPLAY_SH1106), comment this line out to disable oled
120
+ #define OLED_PIN_SDA 4 // 5 //SDA; // i2c SDA Pin
121
+ #define OLED_PIN_SCL 15 // 4 //SCL; // i2c SCL Pin
121
122
#define OLED_ADDR 0x3c
122
123
#define HELTEC_EMBEDDED_PIN 16 // 0 to disable
123
124
#define OLED_FLIP_VERTICALY 1 // 0 to disable
Original file line number Diff line number Diff line change 20
20
#include " config.h"
21
21
#ifdef ESP_OLED_FEATURE
22
22
#include " esp_oled.h"
23
- #include " SSD1306.h"
24
23
#include " Wire.h"
25
- SSD1306 esp_display (OLED_ADDR, OLED_PIN_A, OLED_PIN_B);
24
+
25
+
26
+ // Initialize the OLED display using I2C
27
+ #ifdef OLED_DISPLAY_SSD1306
28
+ #include " SSD1306.h" // alias for `#include "SSD1306Wire.h"`
29
+ #elif defined OLED_DISPLAY_SH1106
30
+ #include " SH1106.h" // alias for `#include "SH1106Wire.h"`
31
+ #endif
32
+
33
+
34
+ #ifdef OLED_DISPLAY_SSD1306
35
+ SSD1306 esp_display (OLED_ADDR, OLED_PIN_SDA, OLED_PIN_SCL);
36
+ #elif defined OLED_DISPLAY_SH1106
37
+ SH1106 esp_display (OLED_ADDR, OLED_PIN_SDA, OLED_PIN_SCL);
38
+ #endif
39
+
40
+
26
41
#define ESP3D_Logo_width 62
27
42
#define ESP3D_Logo_height 45
28
43
const char ESP3D_Logo[] PROGMEM = {
You can’t perform that action at this time.
0 commit comments