====Anschluss von Komponenten an das NodeMCU Board ESP8266 mit i2c==== Für das i2c Protokoll besitzt das Board keine eigenen Pins, die "normalen" GPIO Ports werden dazu verwenden. Pin Layouts von ESP Boards : https://randomnerdtutorials.com/esp8266-pinout-reference-gpios/ Empfohlen wird: * GPIO5: SCL * GPIO4: SDA Wie kann aber überprüft werden, auf welche Adresse der angeschlossene Baustein hört und ob man auch die richtigen Pins verwendet? Siehe hierzu dieses Code Beispiel => https://github.com/trebisky/esp8266/blob/master/zzlua/scanner.lua ---- === i2c mit einem OLED Display ==== * Prinzip => https://jayconsystems.com/blog/getting-started-with-oled-displays * Library => https://github.com/olikraus/u8g2/wiki/u8g2reference Material 0,96 Zoll I2C OLED Display Monochrome 0.96" mit 128 x 64 pixels (white) - Kontroller SSD1306 z.B. von https://www.az-delivery.com/products/0-96zolldisplay . Pin Layout: * VCC -> 5V * GND -> GND * SDA -> A4 * SCL -> A5 Lua Library => https://nodemcu.readthedocs.io/en/master/modules/u8g2/#u8g2dispdrawvline Beispiel Code um das Display anzusprechen => https://github.com/nodemcu/nodemcu-firmware/blob/master/lua_examples/u8g2/graphics_test.lua Was für ein Treiber wird aber in LUA für genau dieses Display benötigt? mit dem "u8g2.ssd1306_i2c_128x64_noname" stürzt mein ESP permanent ab ... ---- ==== Quellen ==== Lua Beispiel OLED Display (veraltet!) * http://www.robertprice.co.uk/robblog/using-an-i2c-128x64-oled-display-with-lua-on-a-nodemcu/ * https://www.electronicwings.com/nodemcu/oled-graphic-display-interfacing-with-nodemcu