File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -39,11 +39,14 @@ Usage Example
39
39
import fourwire
40
40
import adafruit_ili9341
41
41
42
+ # If you use explicit pins with busio.SPI(...), calling release_displays() first
43
+ # prevents "pin in use" errors on subsequent reloads.
44
+ displayio.release_displays()
45
+
42
46
spi = board.SPI()
43
47
tft_cs = board.D9
44
48
tft_dc = board.D10
45
49
46
- displayio.release_displays()
47
50
display_bus = fourwire.FourWire(spi, command = tft_dc, chip_select = tft_cs)
48
51
49
52
display = adafruit_ili9341.ILI9341(display_bus, width = 320 , height = 240 )
@@ -57,8 +60,8 @@ Usage Example
57
60
color_palette[0 ] = 0x FF0000
58
61
59
62
bg_sprite = displayio.TileGrid(color_bitmap,
60
- pixel_shader = color_palette,
61
- x = 0 , y = 0 )
63
+ pixel_shader = color_palette,
64
+ x = 0 , y = 0 )
62
65
splash.append(bg_sprite)
63
66
64
67
while True :
You can’t perform that action at this time.
0 commit comments