SSD1306 - un écran OLED pas cher avec ESPHome

Описание к видео SSD1306 - un écran OLED pas cher avec ESPHome

Afficher du texte, des images et même des animations sur un écran OLED, c'est facile avec ESPHome !!


Code Yaml :
web_server:
port: 80

#ESP32 --- SSD1306
#GND --- GND
#3V3 --- VIN
#D21 --- SDA
#D22 --- SCL

i2c:
sda: GPIO21
scl: GPIO22
scan: true

display:
platform: ssd1306_i2c
model: "SSD1306 128x64"
address: 0x3C
update_interval: 0.2s
lambda: |-
// it.print(0, 0, id(roboto), "Hello World!");
// it.print(0, 18, id(roboto), "Hello again!");
// it.image(0, 0, id(cat));

//Ingress shown animation Frame.
id(cat_gif).next_frame();
// Draw the animation my_animation at position [x=0,y=0]
it.image(25, 0, id(cat_gif), COLOR_ON, COLOR_OFF);

font:
gfonts://family[@weight]
file: "gfonts://Roboto"
id: roboto
size: 20

image:
file: "cat-1.png"
id: cat
resize: 64x64

animation:
file: "cat.gif"
id: cat_gif
resize: 64x64

0:00 Présentation
0:48 Qu'est ce qu'on va faire ?
1:04 Branchements I2C
1:51 Configuration YAML I2C/écran
3:10 Configuration font Google
5:23 Une deuxième ligne
5:52 Afficher une image
7:10 Redimensionner l'image
7:30 Afficher une animation
9:23 Changer la vitesse

Комментарии

Информация по комментариям в разработке