File tree Expand file tree Collapse file tree 2 files changed +17
-17
lines changed
red_vision_examples/dvi_examples Expand file tree Collapse file tree 2 files changed +17
-17
lines changed Original file line number Diff line number Diff line change 105105if display ._buffer_is_in_psram :
106106 import gc
107107 gc .collect ()
108+
109+ # If the ST7789 display is also connected, it can be controlled independently
110+ # of the DVI display. For example, we can show a splash screen on it:
111+ from red_vision .displays import st7789_pio
112+ spi = machine .SPI (baudrate = 24_000_000 )
113+ display2 = st7789_pio .ST7789_PIO (
114+ width = 240 ,
115+ height = 320 ,
116+ sm_id = 4 ,
117+ pin_clk = 22 ,
118+ pin_tx = 23 ,
119+ pin_dc = 20 ,
120+ pin_cs = 21 ,
121+ rotation = 1
122+ )
123+ display2 .splash ("red_vision_examples/images/splash.png" )
Original file line number Diff line number Diff line change 7878 pin_pclk = 40 ,
7979 pin_xclk = 44 , # Optional xclock pin, specify if needed
8080 xclk_freq = 20_000_000 ,
81- buffer = display . _buffer ,
81+ buffer = buffer ,
8282 continuous = True ,
8383)
8484
8585# Open the camera to start the continuous capture process.
8686camera .open ()
8787camera ._capture ()
88-
89- # If the ST7789 display is also connected, it can be controlled independently
90- # of the DVI display. For example, we can show a splash screen on it:
91- from red_vision .displays import st7789_pio
92- spi = machine .SPI (baudrate = 24_000_000 )
93- display2 = st7789_pio .ST7789_PIO (
94- width = 240 ,
95- height = 320 ,
96- sm_id = 4 ,
97- pin_clk = 22 ,
98- pin_tx = 23 ,
99- pin_dc = 20 ,
100- pin_cs = 21 ,
101- rotation = 1
102- )
103- display2 .splash ("red_vision_examples/images/splash.png" )
You can’t perform that action at this time.
0 commit comments