Hi everyone,
i have one of those 16x2 LCD Screens connected to a nodemcu-32s via I2C nand pcf8574.
Unfortunately the LCD only shows white boxes in the first line and nothing in the second line.
(looks similar like on the photo of this reddit user: https://www.reddit.com/r/esp8266/comments/l9afzl/need_help_with_1602_screen/)
I have already tried to turn the contrast on the pcf8574 up & down, but this only makes the boxes in the first line appear / disappear. - No text
Never the less in the ESP log I can see the screen is correctly detected (and if I change sda / scl I can clearly see corresponding errors in the log)
INFO OTA successful
INFO Successfully uploaded program.
INFO Starting log output from 192.168.XX.XX using esphome API
WARNING Can't connect to ESPHome API for 192.168.XX.XX: Error connecting to ('192.168.XX.XX', 6053): [Errno 111] Connect call failed ('192.168.XX.XX', 6053)
INFO Trying to reconnect to 192.168.XX.XX in the background
INFO Successfully connected to 192.168.XX.XX
[12:22:58][I][app:102]: ESPHome version 2022.3.2 compiled on Apr 3 2022, 12:21:34
[12:22:58][C][wifi:491]: WiFi:
[12:22:58][C][wifi:353]: Local MAC: AA:BB:CC:11:22:33
[12:22:58][C][wifi:354]: SSID: [redacted]
[12:22:58][C][wifi:355]: IP Address: 192.168.XX.XX
[12:22:58][C][wifi:357]: BSSID: [redacted]
[12:22:58][C][wifi:358]: Hostname: 'esp32-test'
[12:22:58][C][wifi:360]: Signal strength: -67 dB ▂▄▆█
[12:22:58][C][wifi:364]: Channel: 1
[12:22:58][C][wifi:365]: Subnet: 255.255.255.0
[12:22:58][C][wifi:366]: Gateway: 192.168.XX.1
[12:22:58][C][wifi:367]: DNS1: 192.168.XX.1
[12:22:58][C][wifi:368]: DNS2: 0.0.0.0
[12:22:58][C][logger:233]: Logger:
[12:22:58][C][logger:234]: Level: DEBUG
[12:22:58][C][logger:235]: Log Baud Rate: 115200
[12:22:58][C][logger:236]: Hardware UART: UART0
[12:22:59][C][i2c.arduino:038]: I2C Bus:
[12:22:59][C][i2c.arduino:039]: SDA Pin: GPIO18
[12:22:59][C][i2c.arduino:040]: SCL Pin: GPIO19
[12:22:59][C][i2c.arduino:041]: Frequency: 50000 Hz
[12:22:59][C][i2c.arduino:044]: Recovery: bus successfully recovered
[12:22:59][I][i2c.arduino:054]: Results from i2c bus scan:
[12:22:59][I][i2c.arduino:060]: Found i2c device at address 0x27
[12:22:59][C][lcd_pcf8574:024]: PCF8574 LCD Display:
[12:22:59][C][lcd_pcf8574:025]: Columns: 16, Rows: 2
[12:22:59][C][lcd_pcf8574:026]: Address: 0x27
[12:22:59][C][lcd_pcf8574:027]: Update Interval: 3.0s
[12:22:59][C][captive_portal:088]: Captive Portal:
[12:22:59][C][mdns:084]: mDNS:
[12:22:59][C][mdns:085]: Hostname: esp32-test
[12:22:59][C][ota:085]: Over-The-Air Updates:
[12:22:59][C][ota:086]: Address: 192.168.XX.XX:3232
[12:22:59][C][ota:089]: Using Password.
[12:22:59][C][api:138]: API Server:
[12:22:59][C][api:139]: Address: 192.168.XX.XX:6053
[12:22:59][C][api:143]: Using noise encryption: NO
[12:22:59][D][api:102]: Accepted ::FFFF:C0A8:200E
[12:22:59][D][api.connection:827]: Home Assistant 2022.3.8 (::FFFF:C0A8:200E): Connected successfully
Any idea what could be wrong here?
This is my simple configuration for test:
#WIRING
# ESP32 G19 -> LCD/pcf8574 SCL
# ESP32 G18 -> LCD/pcf8574 SDA
# ESP32 5V -> LCD/pcf8574 VCC
# ESP32 GND -> LCD/pcf8574 GND
esphome:
name: esp32-test
esp32:
board: nodemcu-32s
framework:
type: arduino
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
password: "XXXXXXXXXXXXXXXXXX"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Manually override what address to use to connect to the ESP.
use_address: 192.168.XX.XX
#Set the domain of the node hostname used for uploading.
domain: ''
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Esp32-Test Fallback Hotspot"
password: "XXXXXXXXXX"
captive_portal:
### INTERNAL COMPONENTS & SETUP ###
i2c:
sda: GPIO18
scl: GPIO19
display:
- platform: lcd_pcf8574
dimensions: 16x2
address: 0x27
id: lcd_screen
update_interval: 3s
lambda: |-
it.printf(0,0, "Hello World!");
it.printf(0,1, "Hello Line2!");