I have only been using HA only for a couple of months and have managed to build several simple sensors with esp home.
I had an idea for my father in law with a node mcu and a SSD1306 display for his model railway.
All I wanted to do was display the current time and date, along with a couple of lines of text that scroll the text along,as it is too long to be displayed in 1 line
The time and date work fine I just cannot figure out how to scroll the text, If someone could point me in the right direction I would be very grateful
this is the code I am using at the moment
esphome:
name: displaytest
platform: ESP8266
board: nodemcuv2
wifi:
ssid: "my wifi"
password: "my wifi password"
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Displaytest Fallback Hotspot"
password: "Wom7XF0q85zk"
captive_portal:
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
i2c:
sda: D1
scl: D2
scan: false
frequency: 700khz
font:
- file: 'Lato-Regular.ttf'
id: my_font
size: 10
display:
- platform: ssd1306_i2c
model: "SSD1306 128x64"
reset_pin: GPIO16
address: 0x3C
update_interval: 5s
lambda: |-
it.fill(0);
it.strftime(0, 0, id(my_font), "%H:%M %d-%m-%Y ", id(sntp_time).now());
it.print(20,15, id(my_font), "Killamarsh Central");
it.print(0,35, id(my_font), "The next train to Sheffield is in 12 minutes arriving at platform 3");
it.print(0,50, id(my_font), "The 7.45 from Chesterfield is delayed and will be arriving at 8.20");
Thank you.