Created
August 30, 2023 05:37
-
-
Save arthurbenemann/92007dfe7969e1ffb7722a45b71071c2 to your computer and use it in GitHub Desktop.
esp32_AdafruitLCD
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| esphome: | |
| name: wt32 | |
| includes: | |
| - "Adafruit_LiquidCrystal.h" # copy from https://github.com/adafruit/Adafruit_LiquidCrystal/blob/master/Adafruit_LiquidCrystal.h into project folder with yaml | |
| libraries: | |
| - "Wire" | |
| - "SPI" | |
| - "Adafruit BusIO" | |
| - "Adafruit MCP23017 Arduino Library" | |
| - "Adafruit LiquidCrystal" | |
| esp32: | |
| board: wt32-eth01 | |
| framework: | |
| type: arduino | |
| # Enable logging | |
| logger: | |
| api: | |
| password: "" | |
| ota: | |
| password: "" | |
| ethernet: | |
| type: LAN8720 | |
| mdc_pin: GPIO23 | |
| mdio_pin: GPIO18 | |
| clk_mode: GPIO0_IN | |
| phy_addr: 1 | |
| power_pin: GPIO16 | |
| text_sensor: | |
| - platform: template | |
| name: "test" | |
| on_value: | |
| then: | |
| - lambda: |- | |
| static auto lcd = Adafruit_LiquidCrystal(1); // addres 0x20+(1)= 0x21 | |
| if(lcd.begin(16, 2)){ | |
| ESP_LOGI("lcd", "LCD initialized"); | |
| }else{ | |
| ESP_LOGE("lcd", "LCD not found on i2c bus"); | |
| } | |
| lcd.print("hello, world!"); | |
| lcd.setBacklight(HIGH); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment