[Project] ESPEasy Treiber für 1.8" LCD ST7735 Module

Begonnen von dieter114, 11 April 2020, 22:22:21

Vorheriges Thema - Nächstes Thema

dieter114

Hallo Leute,

man muss dem Virus auch mal die positiver Seiten abgewinnen.
Ich hatte viel Zeit zum programmieren, und so ist es mir trotz meiner lausigen Kentnisse gelungen,
einen ESPEasy Treiber für die billigen ST7735 LCD Module zu schreiben.
Hier erst mal der erste Entwurf mit der ausdrücklichen Bitte an die "Profis" das Ding weiterzuschreiben.
Es gehen 16 Zeilen a. 20 Zeichen Text und auch die Umlaute ÄÖÜ und äöü.
Das Grad °C Symbol wird noch gesucht.

Hardware zum Test dieses Treibers: LoLyn NodeMCU V3 und ein 1.8" LCD Modul mit ST7735 Chip.
Das LCD Modul gibt es manchmal schon für 3-4€.
Bei mir soll es eine kleine Anzeigetafel in einem Poolpumpenhaus im Garten werden.

Ich habe als Muster den Treiber _P012_LCD.ino genommen und entsprechend angepasst.
Wenn man erst einmal den ESPEasy SW-Aufbau verstanden hat, ist es garnicht so schwer.
Die größte Hürde war der Zeichensatz. Die Tabelle gab keine Umlaute her und so hab ich lang suchen und testen müssen.

Ich gehe einmal davon aus das Ihr wisst, wie ein neuer Treiber eingebunden wird, und so beschränke ich mich hier auf die Funktion.
Es erscheint ein neues Modul "Display - ST7735LCD" in der Device Auswahl.
Die Anschlüsse sind wie folgt

TFT_RST   D4 (GPIO2)
TFT_CS    D3 (GPIO0)
TFT_DC    D2 (GPIO4)
SCK (CLK) ---> NodeMCU pin D5 (GPIO14)
MOSI(DIN) ---> NodeMCU pin D7 (GPIO13)
Dann bitte
GND und 3V3 nicht vergessen und schon läuft es erstmal.

Mittlerweile geht auch die Farbdarstellung mit 8 Grundfarben recht ordentlich.
Hier sind nur über die Auflösung von 20*16 Zeilen Grenzen gesetzt.
Das zeilengenaue Beschreiben über die Comandline geht jetzt.
Mir ging es nur erst einmal um eine Textdarstellung von einigen Zeilen für eine Poolsteuerung.
Im Anhang ein paar neue Bilder und natürlich der Treiber.

Edit 04.05.20:
Der Zeilenumbruch funktioniert und auch die genaue Zeilenpositionierung von Text über HTTMOD.
Um einen Text mit Leerzeichen darstellenzu können habe ich ein kleine Veränderung eingebaut.
Jedes Underline "_" was übertragen wird, wandele ich in ein Leerzeichen " " um.
Es muss also nur beim Senden jedes Leerzeichen in ein Underline gewandelt werden.
Die Version mit %20 funtionierte irgendwie nicht, daher diese Version.
Den Textstart also Zeile 1, Spalte 1 habe ich jeweils um 2 Dots eingerückt,
damit bei der "Billigware vom Ali" auch alle Zeichen zu sehen sind!

Edit 02.03.21, Neue Version im Anhang:
Farbdarstellung über 3. Übergabeparameter gelöst.
Beispiel: http://192.168.xxx.xxx:80/control?cmd=LCD,1,1,1,Wassertemp_____%Prozent%°C
wobei Zeile 1, Spalte 1, Farbe 1 und hinter dem Wort Wassertemperatur 5 Leerzeichen dann dargestellt werden.
Also in diesem Fall bis zum rechten Rand.
Die Farben sind: 0 Weiß, 1 Rot, 2 Grün, 3 Blau, 4 Cyan, 5 Magenta, 6 Gelb, 7 Orange
Wichtig: Wenn im Device unter LCD command Mode die Option "Clear then truncate exceeding message" ausgewählt ist,
werden die Farben überschrieben auf den Standardwert.

Edit 04.03.21, Neue Version im Anhang
und dazu die Fontdatei glcdfont.c damit das Grad °C Zeichen endlich mal richtig wird.
Den Font ins Verzeichnis /lib/Adafruit-GFX bzw. in entsprechendes Verzeichnis im Hardwareordner unter \libdeps\ suchen und reinkopieren.

Edit 14.03.21, Neue Version im Anhang
Bugfix: Positionierung mit farbigem Text und evt. Zeilenumbruch funktioniert jetzt.
Pixelverschiebung bei bestimmten Modulen wenn die Randdarstellung schlecht ist:
Ich habe die Pixelverschiebung komplett in den Adafruit_ST7735xx.h Treiber zurückgegeben.
Wenn es gewünscht wird, bitte dort ändern. Ein vernünftiger Zeilenumbruch war anders nicht möglich.
In der _ST7735xx.h sind die Zeilen 107/108 anzupassen.
Hier habe ich 2pt Versatz eingestellt, für mein Modul erforderlich.

Das Modul wurde mit tatkräftiger Unterstützung von Nobbynews weiterentwickelt
und für Platformio angepasst. Daher auch der neue Name _P250_ST7735.ino.
Der "alte" Name hat bei Platformio zu erheblichen Problemen geführt.

Bleibt gesund.

Wolfdieter
RPi II+III+IV,OWX,div.1W Module,HM Zisterne,div. CUL, sduino MAPLEMINI, div ESPEasy, div Tasmota, MQTT2Server,WU-Upload,TabletUI, Indego,Poolsteuerung mit fhem

dieter114

#1
2. Bugfix: Backlight D8 Steuerung über D1 geht jetzt.
RPi II+III+IV,OWX,div.1W Module,HM Zisterne,div. CUL, sduino MAPLEMINI, div ESPEasy, div Tasmota, MQTT2Server,WU-Upload,TabletUI, Indego,Poolsteuerung mit fhem

Neuling_0912

Hallo Dieter,
perfekt, das habe ich gesucht.
Nach langer Suche habe ich nun auch gefunden, wie man das Display als neuen Treiber in ESPEasy einbaut.
Erste Tests sind wirklich super, ein fettes Lob.
Nun zeigt mir dieses lustige Display meine Temperaturen meiner beiden ESP an.
Vielen lieben Dank für die tolle Arbeit

Grüße

Jürgen

dieter114

#3
Hallo Neuling_0912,

ich habe eben gerade die PM gelesen und wollte hier antworten.
Du hast es schon selbst geschafft - Glückwunsch.

Falls Jemand Interesse hat wie grundsätzlich so ein Treiber eingebunden wird
kann ich das hier gern einmal erklären.
Wichtig ist eine funktionierende Arduino-Compilierumgebung und die passenden Harwaretreiber
für die eigene HW also Wemos-D1, LoLyn usw.
Dann erst einmal irgend ein EspEasy kompilieren und schauen ob es läuft.
Meinen Treiber einfach in das Verzeinis des EspEasy kopieren und dann
Wichtig ! die Datei define_plugin_sets.h Ergänzen:
Einfach unter dem Abschnitt //  STABLE ##########
einfügen hinter #define USES_P079   // Wemos Motoshield
einfügen #define USES_P094   // ST7735 LCD
sonst wird der Code zwar mitkompiliert aber nicht integriert
also man sieht immer noch kein LCD ST7735.

Das war`s.

Grüße Wolfdieter
RPi II+III+IV,OWX,div.1W Module,HM Zisterne,div. CUL, sduino MAPLEMINI, div ESPEasy, div Tasmota, MQTT2Server,WU-Upload,TabletUI, Indego,Poolsteuerung mit fhem

knxhm

Hallo Dieter114,

finde deinen Beitrag super, wollte das auch nachbauen, aber...

Mein erstes Problem ist die Entwicklungsumgebung. Ich kriege Atom+Platformio nicht zum laufen.
Ich habe Atom+Platformio auf 3 verschiedene Linux Distributionen (Debian 10, Ubuntu 20.04 und Fedora32) und Windows 10 ausprobiert, bei allen das gleiche Verhalten.
Nach Installation von Platformio belibt Atom stehen und ich muss den Task killen.
Bin scheinbar auch nicht allein mit diesem Problem, z.B. https://community.platformio.org/t/platformio-ide-freezes-atom-during-installation/14379

Ich habe das dann so gelöst, das ich statt Atom+Platformio VS code+Platformio installiert habe, damit läuft dann Platformio.
Dann von git den mega branch von ESPEasys repo gecloned und Build gemacht. Das läuft durch, upload geht auch und ESPEasy läuft auf einer MCU mit ESP12E.

Dann das neue Modul _P098_ST7735.ino ins ESPEasy/src Verzeichnis kopiert, und #define USES_P098 in define_plugin_sets.h Abschnitt //  STABLE eingetragen. Beim Clean / Build seh ich leider gar keinen Effekt, der Build geht durch aber das neue Plugin fehlt.


Dependency Graph
|-- <ESPeasySerial> 2.0.3 #737cfaf
|   |-- <SC16IS752> 1.0.1
|   |   |-- <Wire> 1.0
|   |   |-- <SPI> 1.0
|-- <Adafruit ILI9341> 1.5.5
|   |-- <Adafruit GFX Library> 1.9.0
|   |   |-- <Adafruit BusIO> 1.3.3
|   |   |   |-- <SPI> 1.0
|   |   |   |-- <Wire> 1.0
|   |   |-- <SPI> 1.0
|   |   |-- <Wire> 1.0
|   |-- <Adafruit STMPE610> 1.1.2
|   |   |-- <Wire> 1.0
|   |   |-- <SPI> 1.0
|   |-- <Adafruit TouchScreen> 1.1.0
|   |-- <SPI> 1.0
|-- <Adafruit GFX Library> 1.9.0
|   |-- <Adafruit BusIO> 1.3.3
|   |   |-- <SPI> 1.0
|   |   |-- <Wire> 1.0
|   |-- <SPI> 1.0
|   |-- <Wire> 1.0
|-- <Wire> 1.0
|-- <Adafruit SGP30 Sensor> 1.0.5
|   |-- <Wire> 1.0
|-- <Adafruit MPR121> 1.0.0
|   |-- <Wire> 1.0
|-- <ESP8266_SSD1306> 3.2.7
|   |-- <Wire> 1.0
|   |-- <SPI> 1.0
|-- <ESP8266HTTPUpdateServer> 1.0
|   |-- <ESP8266WiFi> 1.0
|   |-- <ESP8266WebServer> 1.0
|   |   |-- <ESP8266WiFi> 1.0
|-- <SparkFun APDS9960 RGB and Gesture Sensor> 1.4.2
|   |-- <Wire> 1.0
|-- <ESP8266WiFi> 1.0
|-- <Adafruit NeoPixel> 1.0.6
|-- <Adafruit TCS34725> 1.0.1
|   |-- <Wire> 1.0
|-- <ESP8266mDNS> 1.2
|   |-- <ESP8266WiFi> 1.0
|-- <ccronexpr>
|-- <MechInputs> 0.0.1
|-- <ESP8266WebServer> 1.0
|   |-- <ESP8266WiFi> 1.0
|-- <SerialSensors> 0.0.1
|   |-- <ESPeasySerial> 2.0.3 #737cfaf
|   |   |-- <SC16IS752> 1.0.1
|   |   |   |-- <Wire> 1.0
|   |   |   |-- <SPI> 1.0
|-- <ArduinoOTA> 1.0
|   |-- <ESP8266mDNS> 1.2
|   |   |-- <ESP8266WiFi> 1.0
|   |-- <ESP8266WiFi> 1.0
|-- <NewPingESP8266>
|-- <LiquidCrystal_I2C>
|   |-- <Wire> 1.0
|-- <Adafruit Motor Shield V2 Library> 1.0.4
|   |-- <Wire> 1.0
|-- <ESP8266HTTPClient> 1.2
|   |-- <ESP8266WiFi> 1.0
|-- <DNSServer> 1.1.1
|   |-- <ESP8266WiFi> 1.0
|-- <AM2320>
|   |-- <Wire> 1.0
|-- <LittleFS(esp8266)> 0.1.0
|-- <Adafruit Unified Sensor> 1.0.2
|-- <I2Cdevlib-Core>
|   |-- <Wire> 1.0
|-- <AS_BH1750>
|   |-- <Wire> 1.0
|-- <SPI> 1.0
|-- <RN2xx3 Arduino Library> 1.0.1
|-- <HeatpumpIR>
|   |-- <IRremoteESP8266> 2.7.6
|-- <SD(esp8266)> 2.0.0
|   |-- <SDFS> 0.1.0
|   |   |-- <ESP8266SdFat> 1.1.0
|   |   |   |-- <SPI> 1.0
|   |   |-- <SPI> 1.0
|-- <IRremoteESP8266> 2.7.6
|-- <Servo(esp8266)> 1.0.2
|-- <Regexp> 0.1.0
|-- <HLW8012> 1.1.1
|-- <TinyGPSPlus> 1.0.2
|-- <CHT16K33 LED Matrix Library> 0.0.1
|   |-- <Wire> 1.0
|-- <Adafruit TSL2591 Library> 1.0.2
|   |-- <Adafruit Unified Sensor> 1.0.2
|   |-- <Wire> 1.0
|-- <DLBus>
|-- <ArduinoJson> 6.11.0
|-- <SDM> 2.0.0
|   |-- <ESPeasySerial> 2.0.3 #737cfaf
|   |   |-- <SC16IS752> 1.0.1
|   |   |   |-- <Wire> 1.0
|   |   |   |-- <SPI> 1.0
|-- <PubSubClient> 2.7
|-- <Blynk> 0.6.1
|   |-- <ESP8266WiFi> 1.0
Building in release mode


Erst nachdem ich vscode mit vorherigem export PLATFORMIO_BUILD_FLAGS=-DUSES_P098 gestarted habe, wird das neue Plugin mitgebunden, aber der Build geht dann schief.


Processing custom_ESP8266_4M1M (platform: espressif8266@2.5.2; board: esp12e; framework: arduino)
----------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
Custom PIO configuration check
CPPDEFINES:   [['BUILD_GIT', '""'], 'NDEBUG', 'VTABLES_IN_FLASH', 'PIO_FRAMEWORK_ARDUINO_LWIP2_HIGHER_BANDWIDTH_LOW_FLASH', ['PUYA_SUPPORT', '1'], 'CORE_POST_2_5_0', 'BEARSSL_SSL_BASIC', 'CORE_POST_2_6_0', 'PIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK22x_190703', ['MQTT_MAX_PACKET_SIZE', '1024'], ['HTTPCLIENT_1_1_COMPATIBLE', '0'], 'PLUGIN_BUILD_CUSTOM', 'USES_P098']
Custom CPPDEFINES:   ['CONTROLLER_SET_ALL', 'NOTIFIER_SET_NONE', 'PLUGIN_SET_ONLY_SWITCH', 'USES_P001', 'USES_P002', 'USES_P004', 'USES_P027', 'USES_P028', 'USES_P036', 'USES_P045', 'USES_P049', 'USES_P052', 'USES_P056', 'USES_P059', 'USES_P081', 'USES_P082', 'USES_P085', 'USES_C016', 'USES_C018', 'FEATURE_MDNS', 'FEATURE_SD', 'USE_SETTINGS_ARCHIVE']
-------------------------------
Compile time defines
File System:      SPIFFS
PROGNAME:         ESP_Easy_mega_20200705_custom_ESP8266_4M1M
BUILD_PLATFORM:   Linux-4.9.0-12-amd64-x86_64-with-LinuxMint-3-cindy
GIT_HEAD:         pygit2_not_installed
-------------------------------
CONFIGURATION: https://docs.platformio.org/page/boards/espressif8266/esp12e.html
PLATFORM: Espressif 8266 2.5.2 > Espressif ESP8266 ESP-12E
HARDWARE: ESP8266 80MHz, 80KB RAM, 1019.98KB Flash
PACKAGES:
- framework-arduinoespressif8266 a543262
- tool-esptool 1.413.0 (4.13)
- tool-esptoolpy 1.20800.0 (2.8.0)
- toolchain-xtensa 2.40802.200502 (4.8.2)
Converting ESPEasy.ino
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 73 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <ESPeasySerial> 2.0.3 #737cfaf
|   |-- <SC16IS752> 1.0.1
|   |   |-- <SPI> 1.0
|   |   |-- <Wire> 1.0
|-- <Adafruit ILI9341> 1.5.5
|   |-- <Adafruit GFX Library> 1.9.0
|   |   |-- <Adafruit BusIO> 1.3.3
|   |   |   |-- <SPI> 1.0
|   |   |   |-- <Wire> 1.0
|   |   |-- <SPI> 1.0
|   |   |-- <Wire> 1.0
|   |-- <Adafruit STMPE610> 1.1.2
|   |   |-- <SPI> 1.0
|   |   |-- <Wire> 1.0
|   |-- <Adafruit TouchScreen> 1.1.0
|   |-- <SPI> 1.0
|-- <Adafruit GFX Library> 1.9.0
|   |-- <Adafruit BusIO> 1.3.3
|   |   |-- <SPI> 1.0
|   |   |-- <Wire> 1.0
|   |-- <SPI> 1.0
|   |-- <Wire> 1.0
|-- <LittleFS(esp8266)> 0.1.0
|-- <MechInputs> 0.0.1
|-- <DNSServer> 1.1.1
|   |-- <ESP8266WiFi> 1.0
|-- <Regexp> 0.1.0
|-- <Adafruit MPR121> 1.0.0
|   |-- <Wire> 1.0
|-- <ESP8266_SSD1306> 3.2.7
|   |-- <Wire> 1.0
|   |-- <SPI> 1.0
|-- <NewPingESP8266>
|-- <Adafruit TCS34725> 1.0.1
|   |-- <Wire> 1.0
|-- <ccronexpr>
|-- <Adafruit ST7735 and ST7789 Library> 1.5.17
|   |-- <Adafruit GFX Library> 1.9.0
|   |   |-- <Adafruit BusIO> 1.3.3
|   |   |   |-- <SPI> 1.0
|   |   |   |-- <Wire> 1.0
|   |   |-- <SPI> 1.0
|   |   |-- <Wire> 1.0
|   |-- <Adafruit seesaw Library> 1.3.1
|   |   |-- <Wire> 1.0
|   |-- <SD> 0.0.0-alpha+sha.041f788250
|   |   |-- <SPI> 1.0
|   |-- <SPI> 1.0
|-- <ESP8266WebServer> 1.0
|   |-- <ESP8266WiFi> 1.0
|-- <SparkFun APDS9960 RGB and Gesture Sensor> 1.4.2
|   |-- <Wire> 1.0
|-- <Adafruit Motor Shield V2 Library> 1.0.4
|   |-- <Wire> 1.0
|-- <LiquidCrystal_I2C>
|   |-- <Wire> 1.0
|-- <Adafruit SGP30 Sensor> 1.0.5
|   |-- <Wire> 1.0
|-- <AM2320>
|   |-- <Wire> 1.0
|-- <AS_BH1750>
|   |-- <Wire> 1.0
|-- <Adafruit Unified Sensor> 1.0.2
|-- <ArduinoJson> 6.11.0
|-- <Blynk> 0.6.1
|   |-- <ESP8266WiFi> 1.0
|-- <PubSubClient> 2.7
|-- <TinyGPSPlus> 1.0.2
|-- <ESP8266WiFi> 1.0
|-- <SPI> 1.0
|-- <ESP8266mDNS> 1.2
|   |-- <ESP8266WiFi> 1.0
|-- <RN2xx3 Arduino Library> 1.0.1
|-- <HeatpumpIR>
|   |-- <IRremoteESP8266> 2.7.6
|-- <ESP8266HTTPUpdateServer> 1.0
|   |-- <ESP8266WiFi> 1.0
|   |-- <ESP8266WebServer> 1.0
|   |   |-- <ESP8266WiFi> 1.0
|-- <ESP8266HTTPClient> 1.2
|   |-- <ESP8266WiFi> 1.0
|-- <Servo(esp8266)> 1.0.2
|-- <SD> 0.0.0-alpha+sha.041f788250
|   |-- <SPI> 1.0
|-- <SerialSensors> 0.0.1
|   |-- <ESPeasySerial> 2.0.3 #737cfaf
|   |   |-- <SC16IS752> 1.0.1
|   |   |   |-- <SPI> 1.0
|   |   |   |-- <Wire> 1.0
|-- <HLW8012> 1.1.1
|-- <IRremoteESP8266> 2.7.6
|-- <Adafruit NeoPixel> 1.0.6
|-- <CHT16K33 LED Matrix Library> 0.0.1
|   |-- <Wire> 1.0
|-- <Adafruit TSL2591 Library> 1.0.2
|   |-- <Adafruit Unified Sensor> 1.0.2
|   |-- <Wire> 1.0
|-- <I2Cdevlib-Core>
|   |-- <Wire> 1.0
|-- <DLBus>
|-- <ArduinoOTA> 1.0
|   |-- <ESP8266WiFi> 1.0
|   |-- <ESP8266mDNS> 1.2
|   |   |-- <ESP8266WiFi> 1.0
|-- <Wire> 1.0
|-- <SDM> 2.0.0
|   |-- <ESPeasySerial> 2.0.3 #737cfaf
|   |   |-- <SC16IS752> 1.0.1
|   |   |   |-- <SPI> 1.0
|   |   |   |-- <Wire> 1.0
Building in release mode
Generating .pio/build/custom_ESP8266_4M1M/core/core_version.h
Compiling .pio/build/custom_ESP8266_4M1M/lib0a8/Adafruit GFX Library_ID13/glcdfont.c.o
Compiling .pio/build/custom_ESP8266_4M1M/lib32b/LittleFS/lfs.c.o
Compiling .pio/build/custom_ESP8266_4M1M/lib32b/LittleFS/lfs_util.c.o
Compiling .pio/build/custom_ESP8266_4M1M/lib652/Adafruit BusIO_ID6214/Adafruit_BusIO_Register.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/lib76a/ESPeasySerial/ESPEasySerial_ESP8266_noSWserial.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/lib652/Adafruit BusIO_ID6214/Adafruit_SPIDevice.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/lib32b/LittleFS/LittleFS.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/lib76a/ESPeasySerial/ESPEasySerial_ESP32.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/lib0a8/Adafruit GFX Library_ID13/Adafruit_MonoOLED.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/lib76a/ESPeasySerial/ESPeasySerial_ESP8266.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/lib76a/ESPeasySerial/ESPEasySC16IS752_Serial.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/lib468/Wire/Wire.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/lib1cc/Adafruit ILI9341_ID571/Adafruit_ILI9341.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/lib76a/ESPeasySerial/ESPEasySoftwareSerial.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/lib652/Adafruit BusIO_ID6214/Adafruit_I2CDevice.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/lib51e/SPI/SPI.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/lib0a8/Adafruit GFX Library_ID13/Adafruit_GFX.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/lib7f8/SC16IS752/SC16IS752.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/libecc/Adafruit STMPE610_ID377/Adafruit_STMPE610.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/lib0a8/Adafruit GFX Library_ID13/Adafruit_SPITFT.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/lib900/Adafruit TouchScreen_ID5430/TouchScreen.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/lib47f/MechInputs/QEIx4.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/lib856/ESP8266WiFi/BearSSLHelpers.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/lib856/ESP8266WiFi/CertStoreBearSSL.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/lib856/ESP8266WiFi/ESP8266WiFi.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/lib856/ESP8266WiFi/ESP8266WiFiAP.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/lib856/ESP8266WiFi/ESP8266WiFiGeneric.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/lib856/ESP8266WiFi/ESP8266WiFiGratuitous.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/lib856/ESP8266WiFi/ESP8266WiFiMulti.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/lib856/ESP8266WiFi/ESP8266WiFiSTA-WPS.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/lib856/ESP8266WiFi/ESP8266WiFiSTA.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/lib856/ESP8266WiFi/ESP8266WiFiScan.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/lib856/ESP8266WiFi/WiFiClient.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/lib856/ESP8266WiFi/WiFiClientSecureAxTLS.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/lib856/ESP8266WiFi/WiFiClientSecureBearSSL.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/lib856/ESP8266WiFi/WiFiServer.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/lib856/ESP8266WiFi/WiFiServerSecureAxTLS.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/lib856/ESP8266WiFi/WiFiServerSecureBearSSL.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/lib856/ESP8266WiFi/WiFiUdp.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/libca1/DNSServer/DNSServer.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/lib1cd/Regexp/Regexp.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/lib68c/Adafruit_MPR121/Adafruit_MPR121.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/libe4d/esp8266-oled-ssd1306/OLEDDisplay.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/libe4d/esp8266-oled-ssd1306/OLEDDisplayUi.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/libb7a/NewPingESP8266/NewPingESP8266.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/libbb3/Adafruit_TCS34725/Adafruit_TCS34725.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/lib4ec/ccronexpr/ccronexpr.c.o
Compiling .pio/build/custom_ESP8266_4M1M/lib4ec/ccronexpr/ccronexpr_test.c.o
Compiling .pio/build/custom_ESP8266_4M1M/lib8c4/Adafruit seesaw Library_ID1890/Adafruit_Crickit.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/lib8c4/Adafruit seesaw Library_ID1890/Adafruit_NeoTrellis.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/lib8c4/Adafruit seesaw Library_ID1890/Adafruit_TFTShield18.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/lib8c4/Adafruit seesaw Library_ID1890/Adafruit_miniTFTWing.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/lib8c4/Adafruit seesaw Library_ID1890/Adafruit_seesaw.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/lib8c4/Adafruit seesaw Library_ID1890/seesaw_neopixel.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/lib8c4/Adafruit seesaw Library_ID1890/seesaw_servo.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/lib17d/SD_ID161/File.cpp.o
In file included from /home/franz/.platformio/lib/SD_ID161/utility/Sd2Card.h:26:0,
                 from /home/franz/.platformio/lib/SD_ID161/utility/SdFat.h:29,
                 from /home/franz/.platformio/lib/SD_ID161/SD.h:25,
                 from /home/franz/.platformio/lib/SD_ID161/File.cpp:15:
/home/franz/.platformio/lib/SD_ID161/utility/Sd2PinMap.h:371:2: error: #error Architecture or board not supported.
#error Architecture or board not supported.
  ^
Compiling .pio/build/custom_ESP8266_4M1M/lib17d/SD_ID161/SD.cpp.o
In file included from /home/franz/.platformio/lib/SD_ID161/utility/Sd2Card.h:26:0,
                 from /home/franz/.platformio/lib/SD_ID161/utility/SdFat.h:29,
                 from /home/franz/.platformio/lib/SD_ID161/SD.h:25,
                 from /home/franz/.platformio/lib/SD_ID161/SD.cpp:53:
/home/franz/.platformio/lib/SD_ID161/utility/Sd2PinMap.h:371:2: error: #error Architecture or board not supported.
#error Architecture or board not supported.
  ^
Compiling .pio/build/custom_ESP8266_4M1M/lib17d/SD_ID161/utility/Sd2Card.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/lib17d/SD_ID161/utility/SdFile.cpp.o
In file included from /home/franz/.platformio/lib/SD_ID161/utility/Sd2Card.h:26:0,
                 from /home/franz/.platformio/lib/SD_ID161/utility/SdFat.h:29,
                 from /home/franz/.platformio/lib/SD_ID161/utility/SdFile.cpp:20:
/home/franz/.platformio/lib/SD_ID161/utility/Sd2PinMap.h:371:2: error: #error Architecture or board not supported.
#error Architecture or board not supported.
  ^
In file included from /home/franz/.platformio/lib/SD_ID161/utility/SdFat.h:29:0,
                 from /home/franz/.platformio/lib/SD_ID161/SD.h:25,
                 from /home/franz/.platformio/lib/SD_ID161/File.cpp:15:
/home/franz/.platformio/lib/SD_ID161/utility/Sd2Card.h:65:37: error: 'SS_PIN' was not declared in this scope
uint8_t const  SD_CHIP_SELECT_PIN = SS_PIN;
                                     ^
/home/franz/.platformio/lib/SD_ID161/utility/Sd2Card.h:68:31: error: 'MOSI_PIN' was not declared in this scope
uint8_t const  SPI_MOSI_PIN = MOSI_PIN;
                               ^
/home/franz/.platformio/lib/SD_ID161/utility/Sd2Card.h:70:31: error: 'MISO_PIN' was not declared in this scope
uint8_t const  SPI_MISO_PIN = MISO_PIN;
                               ^
/home/franz/.platformio/lib/SD_ID161/utility/Sd2Card.h:72:30: error: 'SCK_PIN' was not declared in this scope
uint8_t const  SPI_SCK_PIN = SCK_PIN;
                              ^
In file included from /home/franz/.platformio/lib/SD_ID161/utility/Sd2Card.h:26:0,
                 from /home/franz/.platformio/lib/SD_ID161/utility/Sd2Card.cpp:26:
/home/franz/.platformio/lib/SD_ID161/utility/Sd2PinMap.h:371:2: error: #error Architecture or board not supported.
#error Architecture or board not supported.
  ^
*** [.pio/build/custom_ESP8266_4M1M/lib17d/SD_ID161/File.cpp.o] Error 1
In file included from /home/franz/.platformio/lib/SD_ID161/utility/SdFat.h:29:0,
                 from /home/franz/.platformio/lib/SD_ID161/utility/SdFile.cpp:20:
/home/franz/.platformio/lib/SD_ID161/utility/Sd2Card.h:65:37: error: 'SS_PIN' was not declared in this scope
uint8_t const  SD_CHIP_SELECT_PIN = SS_PIN;
                                     ^
/home/franz/.platformio/lib/SD_ID161/utility/Sd2Card.h:68:31: error: 'MOSI_PIN' was not declared in this scope
uint8_t const  SPI_MOSI_PIN = MOSI_PIN;
                               ^
/home/franz/.platformio/lib/SD_ID161/utility/Sd2Card.h:70:31: error: 'MISO_PIN' was not declared in this scope
uint8_t const  SPI_MISO_PIN = MISO_PIN;
                               ^
/home/franz/.platformio/lib/SD_ID161/utility/Sd2Card.h:72:30: error: 'SCK_PIN' was not declared in this scope
uint8_t const  SPI_SCK_PIN = SCK_PIN;
                              ^
In file included from /home/franz/.platformio/lib/SD_ID161/utility/SdFat.h:29:0,
                 from /home/franz/.platformio/lib/SD_ID161/SD.h:25,
                 from /home/franz/.platformio/lib/SD_ID161/SD.cpp:53:
/home/franz/.platformio/lib/SD_ID161/utility/Sd2Card.h:65:37: error: 'SS_PIN' was not declared in this scope
uint8_t const  SD_CHIP_SELECT_PIN = SS_PIN;
                                     ^
/home/franz/.platformio/lib/SD_ID161/utility/Sd2Card.h:68:31: error: 'MOSI_PIN' was not declared in this scope
uint8_t const  SPI_MOSI_PIN = MOSI_PIN;
                               ^
/home/franz/.platformio/lib/SD_ID161/utility/Sd2Card.h:70:31: error: 'MISO_PIN' was not declared in this scope
uint8_t const  SPI_MISO_PIN = MISO_PIN;
                               ^
/home/franz/.platformio/lib/SD_ID161/utility/Sd2Card.h:72:30: error: 'SCK_PIN' was not declared in this scope
uint8_t const  SPI_SCK_PIN = SCK_PIN;
                              ^
*** [.pio/build/custom_ESP8266_4M1M/lib17d/SD_ID161/SD.cpp.o] Error 1
In file included from /home/franz/.platformio/lib/SD_ID161/utility/Sd2Card.cpp:26:0:
/home/franz/.platformio/lib/SD_ID161/utility/Sd2Card.h:65:37: error: 'SS_PIN' was not declared in this scope
uint8_t const  SD_CHIP_SELECT_PIN = SS_PIN;
                                     ^
/home/franz/.platformio/lib/SD_ID161/utility/Sd2Card.h:68:31: error: 'MOSI_PIN' was not declared in this scope
uint8_t const  SPI_MOSI_PIN = MOSI_PIN;
                               ^
/home/franz/.platformio/lib/SD_ID161/utility/Sd2Card.h:70:31: error: 'MISO_PIN' was not declared in this scope
uint8_t const  SPI_MISO_PIN = MISO_PIN;
                               ^
/home/franz/.platformio/lib/SD_ID161/utility/Sd2Card.h:72:30: error: 'SCK_PIN' was not declared in this scope
uint8_t const  SPI_SCK_PIN = SCK_PIN;
                              ^
/home/franz/.platformio/lib/SD_ID161/utility/Sd2Card.cpp: In member function 'uint8_t Sd2Card::init(uint8_t, uint8_t, int8_t, int8_t, int8_t)':
/home/franz/.platformio/lib/SD_ID161/utility/Sd2Card.cpp:302:17: error: cannot convert 'volatile uint32_t* {aka volatile unsigned int*}' to 'volatile uint8_t* {aka volatile unsigned char*}' in assignment
     clkport     = portOutputRegister(digitalPinToPort(clockPin_));
                 ^
/home/franz/.platformio/lib/SD_ID161/utility/Sd2Card.cpp:304:17: error: cannot convert 'volatile uint32_t* {aka volatile unsigned int*}' to 'volatile uint8_t* {aka volatile unsigned char*}' in assignment
     mosiport    = portOutputRegister(digitalPinToPort(mosiPin_));
                 ^
/home/franz/.platformio/lib/SD_ID161/utility/Sd2Card.cpp:306:17: error: cannot convert 'volatile uint32_t* {aka volatile unsigned int*}' to 'volatile uint8_t* {aka volatile unsigned char*}' in assignment
     misoport    = portInputRegister(digitalPinToPort(misoPin_));
                 ^
/home/franz/.platformio/lib/SD_ID161/utility/Sd2Card.cpp: In member function 'uint8_t Sd2Card::readData(uint32_t, uint16_t, uint16_t, uint8_t*)':
/home/franz/.platformio/lib/SD_ID161/utility/Sd2Card.cpp:438:12: warning: unused variable 'n' [-Wunused-variable]
   uint16_t n;
            ^
*** [.pio/build/custom_ESP8266_4M1M/lib17d/SD_ID161/utility/Sd2Card.cpp.o] Error 1
/home/franz/.platformio/lib/SD_ID161/utility/SdFile.cpp: In static member function 'static uint8_t SdFile::make83Name(const char*, uint8_t*)':
/home/franz/.platformio/lib/SD_ID161/utility/SdFile.cpp:261:15: warning: unused variable 'b' [-Wunused-variable]
       uint8_t b;
               ^
/home/franz/.platformio/lib/SD_ID161/utility/SdFile.cpp: In member function 'uint8_t SdFile::rmRfStar()':
/home/franz/.platformio/lib/SD_ID161/utility/SdFile.cpp:907:40: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if (curPosition_ != (32*(index + 1))) {
                                        ^
*** [.pio/build/custom_ESP8266_4M1M/lib17d/SD_ID161/utility/SdFile.cpp.o] Error 1
================================================== [FAILED] Took 12.40 seconds ==================================================


Da hat einer das gleiche Problem.
https://community.platformio.org/t/build-error-adafruit-st7735-and-st7789-library-on-esp8266-platform/13144

Mit dem workaround hab ich es aber auch nicht geschafft.

Ich frag mich ob das mit Atom+Platformio anders laufen würde ?

Bin ziehmlich ratlos.

Könntest du mir bitte dein ESPEasy bin Image zur Verfügung stellen?

Grüße knxhm

KNX, HM, HMLAN, RPi 2 mit Raspbian Jessie, knxd und FHEM, 1w Temperaturmessung mit gpio4, Dämmerungssensor, autom. Rolladensteuerung

dieter114

Also ich kenne mich mit Atom+Platformio überhaupt nicht aus.
Bei mir läuft Arduino on Windows einfach heruntergeladen.
Ok - viele sind damit nicht zufrieden. Ich hab es zum Laufen gebracht und dann geht es auch gut
wenn das "richtige" Board eingestellt ist und alle Bibliotheken vorhanden sind.
Ich habe hier eine Version für nen ESP12E Modul angehängt.
Versuch es mal damit.

Gruß Wolfdieter
RPi II+III+IV,OWX,div.1W Module,HM Zisterne,div. CUL, sduino MAPLEMINI, div ESPEasy, div Tasmota, MQTT2Server,WU-Upload,TabletUI, Indego,Poolsteuerung mit fhem

knxhm

Danke Dieter, ich habs probiert, es funktioniert, merkwürdigerweise aber nur auf Wemos D1 mini, nicht auf NodeMCU.

Da bekomme ich das, und wlan geht nicht.
128 : Info  : CRC  : No program memory checksum found. Check output of crc2.py
162 : Error : FS   : Error while reading/writing security.dat in 1026
163 : Error : CRC  : SecuritySettings CRC   ...FAIL

Mit dem Mega Juni bin Release funktionieren die Node MCU aber, also kaputt sind die wohl nicht.
Da gibts wohl unter der Haube leichte Unterschiede bei den ESPs.

Aber egal, dann nehme ich eben den Wemos, danke das du mir weitergeholfen hast.

knxhm
KNX, HM, HMLAN, RPi 2 mit Raspbian Jessie, knxd und FHEM, 1w Temperaturmessung mit gpio4, Dämmerungssensor, autom. Rolladensteuerung

dieter114

#7
Ich hatte das für eine Node MCU 1.0 ESP 12E compiliert.
Hier nochmal eine Version für die Node MCU 0.9 ESP 12 Modul.
Probier die mal aus.
Gruß Wolfdieter
RPi II+III+IV,OWX,div.1W Module,HM Zisterne,div. CUL, sduino MAPLEMINI, div ESPEasy, div Tasmota, MQTT2Server,WU-Upload,TabletUI, Indego,Poolsteuerung mit fhem

knxhm

Habs probiert aber es schaut gleich aus. und WLAN geht nicht.
Ist egal, ich hab ja mit dem WEMOS mini eine funktionierende HW.

INIT : Booting version: (custom) (ESP82xx Core 2_7_0, NONOS SDK 2.2.2-dev(38a443e), LWIP: 2.1.2)
70 : Info  : INIT : Free RAM:38720
71 : Info  : INIT : Warm boot #3 Last Task: Const Interval timer, id: 2 Last systime: 2687 - Restart Reasm
72 : Info  : FS   : Mounting...
121 : Info  : FS   : Mount successful, used 142819 bytes of 1953282
129 : Info  : CRC  : No program memory checksum found. Check output of crc2.py
162 : Error : FS   : Error while reading/writing security.dat in 1026
163 : Error : CRC  : SecuritySettings CRC   ...FAIL
164 : Info  : WIFI  : Start network scan
2539 : Info  : INIT : Free RAM:35400
2540 : Info  : INIT : I2C
2540 : Info  : INIT : SPI not enabled
2626 : Info  : INFO : Plugins: 47 [Normal] (ESP82xx Core 2_7_0, NONOS SDK 2.2.2-dev(38a443e), LWIP: 2.1.2)
2630 : Info  : Webserver: start
2631 : Info  : Time set to 2687.000 Time adjusted by 2684370.00 msec. Wander: 745.66 msec/second
2632 : Info  : Current Time Zone: STD time start: 1970-10-25 03:00:00 offset: 0 min
2635 : Info  : Local time: 1970-01-01 00:44:47
2648 : Info  : WIFI  : Scan finished, found: 2
2654 : Error : WIFI : No valid wifi settings
2756 : Info  : WIFI : Set WiFi to AP+STA
2864 : Info  : WIFI : AP Mode ssid will be ESP_Easy with address 192.168.4.1
2865 : Error : WIFI : Could not prepare WiFi!
3981 : Info  : WD   : Uptime 0 ConnectFailures 0 FreeMem 27376 WiFiStatus 0


Danke für Deine Mühe

knxhm
KNX, HM, HMLAN, RPi 2 mit Raspbian Jessie, knxd und FHEM, 1w Temperaturmessung mit gpio4, Dämmerungssensor, autom. Rolladensteuerung

bigbambee

Hallo, habe es gerade gefunden und ausprobiert.
Bei mir kommt ein 1,77" Display ST7735 mit 160x128 Pixel zum Einsatz.
Mit ein paar kleinen Änderungen im aktuellen ESPEasy (Einbinden der Custom.h)

// *****************************************************************************************
// For Arduino IDE users:
// When building using Custom.h, uncomment the next line:
#define USE_CUSTOM_H
// *************

und Anpassen der Pins:

// ST7735 TFT module connections
#define TFT_RST   D4     // TFT RST pin is connected to NodeMCU pin D4 (GPIO2)
#define TFT_CS    D8     // TFT CS  pin is connected to NodeMCU pin D3 (GPIO0)
#define TFT_DC    D3     // TFT DC  pin is connected to NodeMCU pin D2 (GPIO4)

war die erste Anzeige da. Jetzt gehts weiter in die Optimierung.  ;D

Arduino    1.8.13
ESP          2.7.4
ESPEasy   23.11.2020


dieter114

#10
Hallo bigbambee

ich habe eben gelesen das du etwas am Modul machst.
Finde ich gut! Wie sind denn deine Kenntnisse in EspEasy?
Ich habe das Modul mittlerweile weiterentwickelt für farbige Anzeigen.
Nur an einer Stelle komme ich irgendwie nicht weiter:
Die Farbe (0-9 Zahl) wird als dritter Parameter nach Reihe und Stelle übertragen.
Danach wird einfach die Vorder/Hintergundfarbe geändert und der Text ausgegeben.
Nur diese Auswahl der Farbe (colormode)  funktioniert so nicht wie im Anhang erstellt.
Evt. kannst du mir helfen?

Gruß Wolfdieter
RPi II+III+IV,OWX,div.1W Module,HM Zisterne,div. CUL, sduino MAPLEMINI, div ESPEasy, div Tasmota, MQTT2Server,WU-Upload,TabletUI, Indego,Poolsteuerung mit fhem

biggsmann

Kleiner Tipp: BL (Pin7 am Display) muss an Vcc, sonst bleibt das ganze duster.
Ansonsten danke für die Umsetzung.

cu
biggsmann

bigbambee

Hallo Wolfdieter,
ich bin gerade im Umzug ins neue (smarte) Haus und habe nicht so viel Zeit.

In deine Erweiterung schaue ich gerne mal rein und versuche das mit den Farben zu verstehen. Meist verwende ich die TFT_eSPI Lib für das Display. Da wird alles in der config eingestellt.
Gruß
BigBamBee

riker1

Hi, lese hier mal mit.
Gibt es so ein Setup eventuell auch über Tasmota oder ESPEasy?

Danke VG T
FHEM    5.26.1 Ubuntu 18, FHEM    5.26.1 RPI 3 , Actoren: IT ,Tasmota, ESPEasy,
MAX CUBE, MAX HT, MAX WT, Selbstbau nanoCULs, FS 20,Tasmota, Homematic, FTK, SW. DIM, Smoke,KODI,Squeezebox

dieter114

#14
Hallo riker1

was für ein Setup meinst du denn?
Es wird ein komplettes ESPEasy neu kompiliert und geflasht.
Dann das Modul neu in Heimnetz übernommen und in fhem eingebunden.
Im Modul selbst gibt es dann eine Möglichkeit das LCD ST7735 anzusprechen
und mittels entsprechenden Routinen z.B HTTPMOD:
define Pool_Anz_1 HTTPMOD http://192.168.xxx.xx:80/control?cmd=LCD,1,1,Wassertemp____%Prozent%.C 600  [/code]
einen Text anzeigen zu lassen.
Wenn mehrere Zeilen übertragen werden sollen geht das auch prima mit dem Modul MSwitch:
https://wiki.fhem.de/wiki/MSwitch

Gruß Wolfdieter
RPi II+III+IV,OWX,div.1W Module,HM Zisterne,div. CUL, sduino MAPLEMINI, div ESPEasy, div Tasmota, MQTT2Server,WU-Upload,TabletUI, Indego,Poolsteuerung mit fhem