Skip to content

Commit 0c97655

Browse files
authored
Merge pull request #3 from makermelissa/master
Updated Init delay and Fixed Example
2 parents 5afe1aa + f00bf3c commit 0c97655

File tree

3 files changed

+14
-24
lines changed

3 files changed

+14
-24
lines changed

README.rst

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ Usage Example
3636
from adafruit_hx8357 import HX8357
3737
3838
spi = board.SPI()
39-
tft_cs = board.D5
40-
tft_dc = board.D6
39+
tft_cs = board.D9
40+
tft_dc = board.D10
4141
4242
displayio.release_displays()
4343
display_bus = displayio.FourWire(spi, command=tft_dc, chip_select=tft_cs)
@@ -52,14 +52,9 @@ Usage Example
5252
color_palette = displayio.Palette(1)
5353
color_palette[0] = 0xFF0000
5454
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)
6358
splash.append(bg_sprite)
6459
6560
while True:

adafruit_hx8357.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_HX8357.git"
5252

5353
_INIT_SEQUENCE = (
54-
b"\x01\x80\x0A" # _SWRESET and Delay 10ms
54+
b"\x01\x80\x64" # _SWRESET and Delay 100ms
5555
b"\xB9\x83\xFF\x83\x57\xFF" # _SETC and delay 500ms
5656
b"\xB3\x04\x80\x00\x06\x06" # _SETRGB 0x80 enables SDO pin (0x00 disables)
5757
b"\xB6\x01\x25" # _SETCOM -1.52V

examples/hx8357_simpletest.py

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
"""
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+
"""
55

66
import board
77
import displayio
88
from adafruit_hx8357 import HX8357
99

1010
spi = board.SPI()
11-
tft_cs = board.D5
12-
tft_dc = board.D6
11+
tft_cs = board.D9
12+
tft_dc = board.D10
1313

1414
displayio.release_displays()
1515
display_bus = displayio.FourWire(spi, command=tft_dc, chip_select=tft_cs)
@@ -24,14 +24,9 @@
2424
color_palette = displayio.Palette(1)
2525
color_palette[0] = 0xFF0000
2626

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)
3530
splash.append(bg_sprite)
3631

3732
while True:

0 commit comments

Comments
 (0)