mirror of
https://github.com/lumapu/ahoy.git
synced 2025-05-31 01:36:11 +02:00
Hinzufügen vom 1,3"
This commit is contained in:
parent
27b3a9cd87
commit
94487641cc
4 changed files with 54 additions and 10 deletions
|
@ -74,7 +74,7 @@ void app::setup() {
|
|||
mApi.setup(this, mSys, mWeb.getWebSrvPtr(), mConfig);
|
||||
|
||||
// Plugins
|
||||
#if defined(ENA_NOKIA) || defined(ENA_SSD1306)
|
||||
#if defined(ENA_NOKIA) || defined(ENA_SSD1306) || defined(ENA_SH1106)
|
||||
mMonoDisplay.setup(mSys, &mTimestamp);
|
||||
everySec(std::bind(&MonoDisplayType::tickerSecond, &mMonoDisplay));
|
||||
#endif
|
||||
|
|
|
@ -46,7 +46,7 @@ typedef PubMqtt<HmSystemType> PubMqttType;
|
|||
typedef PubSerial<HmSystemType> PubSerialType;
|
||||
|
||||
// PLUGINS
|
||||
#if defined(ENA_NOKIA) || defined(ENA_SSD1306)
|
||||
#if defined(ENA_NOKIA) || defined(ENA_SSD1306) || defined(ENA_SH1106)
|
||||
#include "plugins/MonochromeDisplay/MonochromeDisplay.h"
|
||||
typedef MonochromeDisplay<HmSystemType> MonoDisplayType;
|
||||
#endif
|
||||
|
@ -180,7 +180,7 @@ class app : public IApp, public ah::Scheduler {
|
|||
#if !defined(AP_ONLY)
|
||||
mMqtt.payloadEventListener(cmd);
|
||||
#endif
|
||||
#if defined(ENA_NOKIA) || defined(ENA_SSD1306)
|
||||
#if defined(ENA_NOKIA) || defined(ENA_SSD1306) || defined(ENA_SH1106)
|
||||
mMonoDisplay.payloadEventListener(cmd);
|
||||
#endif
|
||||
}
|
||||
|
@ -244,7 +244,7 @@ class app : public IApp, public ah::Scheduler {
|
|||
uint32_t mSunrise, mSunset;
|
||||
|
||||
// plugins
|
||||
#if defined(ENA_NOKIA) || defined(ENA_SSD1306)
|
||||
#if defined(ENA_NOKIA) || defined(ENA_SSD1306) || defined(ENA_SH1106)
|
||||
MonoDisplayType mMonoDisplay;
|
||||
#endif
|
||||
};
|
||||
|
|
|
@ -125,6 +125,24 @@ lib_deps =
|
|||
https://github.com/ThingPulse/esp8266-oled-ssd1306.git
|
||||
https://github.com/JChristensen/Timezone
|
||||
|
||||
[env:esp8266-sh1106]
|
||||
platform = espressif8266
|
||||
board = esp12e
|
||||
board_build.f_cpu = 80000000L
|
||||
build_flags = -D RELEASE -DENA_SH1106
|
||||
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
|
||||
https://github.com/bertmelis/espMqttClient#v1.3.3
|
||||
bblanchon/ArduinoJson
|
||||
https://github.com/ThingPulse/esp8266-oled-ssd1306.git
|
||||
https://github.com/JChristensen/Timezone
|
||||
|
||||
[env:esp32-wroom32-release]
|
||||
platform = espressif32
|
||||
board = lolin_d32
|
||||
|
@ -181,3 +199,21 @@ lib_deps =
|
|||
bblanchon/ArduinoJson
|
||||
https://github.com/ThingPulse/esp8266-oled-ssd1306.git
|
||||
https://github.com/JChristensen/Timezone
|
||||
|
||||
[env:esp32-wroom32-sh1106]
|
||||
platform = espressif32
|
||||
board = lolin_d32
|
||||
build_flags = -D RELEASE -std=gnu++14 -DENA_SH1106
|
||||
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
|
||||
https://github.com/bertmelis/espMqttClient#v1.3.3
|
||||
bblanchon/ArduinoJson
|
||||
https://github.com/ThingPulse/esp8266-oled-ssd1306.git
|
||||
https://github.com/JChristensen/Timezone
|
|
@ -1,15 +1,19 @@
|
|||
#ifndef __MONOCHROME_DISPLAY__
|
||||
#define __MONOCHROME_DISPLAY__
|
||||
|
||||
#if defined(ENA_NOKIA) || defined(ENA_SSD1306)
|
||||
#if defined(ENA_NOKIA) || defined(ENA_SSD1306) || defined(ENA_SH1106)
|
||||
#ifdef ENA_NOKIA
|
||||
#include <U8g2lib.h>
|
||||
#define DISP_PROGMEM U8X8_PROGMEM
|
||||
#else // ENA_SSD1306
|
||||
#else // ENA_SSD1306 || ENA_SH1106
|
||||
/* esp8266 : SCL = 5, SDA = 4 */
|
||||
/* ewsp32 : SCL = 22, SDA = 21 */
|
||||
#include <Wire.h>
|
||||
#include <SSD1306Wire.h>
|
||||
#ifdef ENA_SSD1306
|
||||
#include <SSD1306Wire.h>
|
||||
# else //ENA_SH1106
|
||||
#include <SH1106Wire.h>
|
||||
#endif
|
||||
#define DISP_PROGMEM PROGMEM
|
||||
#endif
|
||||
|
||||
|
@ -34,7 +38,7 @@ class MonochromeDisplay {
|
|||
mNewPayload = false;
|
||||
mExtra = 0;
|
||||
}
|
||||
#else // ENA_SSD1306
|
||||
#else // ENA_SSD1306 || ENA_SH1106
|
||||
MonochromeDisplay() : mDisplay(0x3c, SDA, SCL), mCE(CEST, CET) {
|
||||
mNewPayload = false;
|
||||
mExtra = 0;
|
||||
|
@ -215,7 +219,7 @@ class MonochromeDisplay {
|
|||
mDisplay.sendBuffer();
|
||||
} while( mDisplay.nextPage() );
|
||||
mExtra++;
|
||||
#else // ENA_SSD1306
|
||||
#else // ENA_SSD1306 || ENA_SH1106
|
||||
if(mUp) {
|
||||
mRx += 2;
|
||||
if(mRx >= 20)
|
||||
|
@ -289,7 +293,11 @@ class MonochromeDisplay {
|
|||
#if defined(ENA_NOKIA)
|
||||
U8G2_PCD8544_84X48_1_4W_HW_SPI mDisplay;
|
||||
#else // ENA_SSD1306
|
||||
SSD1306Wire mDisplay;
|
||||
#ifdef ENA_SSD1306
|
||||
SSD1306Wire mDisplay;
|
||||
# else //ENA_SH1106
|
||||
SH1106Wire mDisplay;
|
||||
#endif
|
||||
int mRx;
|
||||
char mUp;
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue