File tree Expand file tree Collapse file tree 3 files changed +14
-24
lines changed Expand file tree Collapse file tree 3 files changed +14
-24
lines changed Original file line number Diff line number Diff line change @@ -36,8 +36,8 @@ Usage Example
36
36
from adafruit_hx8357 import HX8357
37
37
38
38
spi = board.SPI()
39
- tft_cs = board.D5
40
- tft_dc = board.D6
39
+ tft_cs = board.D9
40
+ tft_dc = board.D10
41
41
42
42
displayio.release_displays()
43
43
display_bus = displayio.FourWire(spi, command = tft_dc, chip_select = tft_cs)
@@ -52,14 +52,9 @@ Usage Example
52
52
color_palette = displayio.Palette(1 )
53
53
color_palette[0 ] = 0x FF0000
54
54
55
- try :
56
- bg_sprite = displayio.TileGrid(color_bitmap,
57
- pixel_shader = color_palette,
58
- position = (0 , 0 ))
59
- except TypeError :
60
- bg_sprite = displayio.TileGrid(color_bitmap,
61
- pixel_shader = color_palette,
62
- x = 0 , y = 0 )
55
+ bg_sprite = displayio.TileGrid(color_bitmap,
56
+ pixel_shader = color_palette,
57
+ x = 0 , y = 0 )
63
58
splash.append(bg_sprite)
64
59
65
60
while True :
Original file line number Diff line number Diff line change 51
51
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_HX8357.git"
52
52
53
53
_INIT_SEQUENCE = (
54
- b"\x01 \x80 \x0A " # _SWRESET and Delay 10ms
54
+ b"\x01 \x80 \x64 " # _SWRESET and Delay 100ms
55
55
b"\xB9 \x83 \xFF \x83 \x57 \xFF " # _SETC and delay 500ms
56
56
b"\xB3 \x04 \x80 \x00 \x06 \x06 " # _SETRGB 0x80 enables SDO pin (0x00 disables)
57
57
b"\xB6 \x01 \x25 " # _SETCOM -1.52V
Original file line number Diff line number Diff line change 1
1
"""
2
- This test will initialize the display using displayio
3
- and draw a solid red background
4
- """
2
+ This test will initialize the display using displayio
3
+ and draw a solid red background
4
+ """
5
5
6
6
import board
7
7
import displayio
8
8
from adafruit_hx8357 import HX8357
9
9
10
10
spi = board .SPI ()
11
- tft_cs = board .D5
12
- tft_dc = board .D6
11
+ tft_cs = board .D9
12
+ tft_dc = board .D10
13
13
14
14
displayio .release_displays ()
15
15
display_bus = displayio .FourWire (spi , command = tft_dc , chip_select = tft_cs )
24
24
color_palette = displayio .Palette (1 )
25
25
color_palette [0 ] = 0xFF0000
26
26
27
- try :
28
- bg_sprite = displayio .TileGrid (color_bitmap ,
29
- pixel_shader = color_palette ,
30
- position = (0 , 0 ))
31
- except TypeError :
32
- bg_sprite = displayio .TileGrid (color_bitmap ,
33
- pixel_shader = color_palette ,
34
- x = 0 , y = 0 )
27
+ bg_sprite = displayio .TileGrid (color_bitmap ,
28
+ pixel_shader = color_palette ,
29
+ x = 0 , y = 0 )
35
30
splash .append (bg_sprite )
36
31
37
32
while True :
You can’t perform that action at this time.
0 commit comments