Merge pull request #257 from AustinSaintAubin/2.0

Added support for SH1106
This commit is contained in:
Luc 2018-11-26 09:59:28 +01:00 committed by GitHub
commit 20ad97f41b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 22 additions and 5 deletions

1
.gitignore vendored
View File

@ -1,4 +1,5 @@
Thumbs.db
.DS_Store
*.orig
embedded/node_modules
embedded/dist

View File

@ -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_SSD1306 // OLED Display Type: SSD1306(OLED_DISPLAY_SSD1306) / SH1106(OLED_DISPLAY_SH1106), comment this line out to disable oled
#define OLED_PIN_SDA 4 //5 //SDA; // i2c SDA Pin
#define OLED_PIN_SCL 15 //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

View File

@ -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(OLED_ADDR, OLED_PIN_SDA, OLED_PIN_SCL);
#elif defined OLED_DISPLAY_SH1106
SH1106 esp_display(OLED_ADDR, OLED_PIN_SDA, OLED_PIN_SCL);
#endif
#define ESP3D_Logo_width 62
#define ESP3D_Logo_height 45
const char ESP3D_Logo[] PROGMEM = {