File tree Expand file tree Collapse file tree
lib/steami_screen/examples Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ """
2+ Cycle through all 6 built-in face expressions.
3+ """
4+
5+ from time import sleep_ms
6+
7+ import ssd1327
8+ from machine import SPI , Pin
9+ from steami_screen import Screen , SSD1327Display
10+
11+ # --- Display setup ---
12+ spi = SPI (1 )
13+ dc = Pin ("DATA_COMMAND_DISPLAY" )
14+ res = Pin ("RST_DISPLAY" )
15+ cs = Pin ("CS_DISPLAY" )
16+
17+ raw_display = ssd1327 .WS_OLED_128X128_SPI (spi , dc , res , cs )
18+ display = SSD1327Display (raw_display )
19+ screen = Screen (display )
20+
21+ faces = [
22+ ("happy" , "HAPPY" ),
23+ ("sad" , "SAD" ),
24+ ("surprised" , "SURPRISED" ),
25+ ("sleeping" , "SLEEPING" ),
26+ ("angry" , "ANGRY" ),
27+ ("love" , "LOVE" ),
28+ ]
29+
30+ compact = True
31+
32+ while True :
33+ compact = not compact
34+ for expression , label in faces :
35+ screen .clear ()
36+ screen .face (expression , compact = compact )
37+ screen .show ()
38+ print ("Showing face:" , label , "Compact:" , compact )
39+ sleep_ms (1000 )
You can’t perform that action at this time.
0 commit comments