Skip to content

Updated Init delay and Fixed Example #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 29, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 5 additions & 10 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ Usage Example
from adafruit_hx8357 import HX8357

spi = board.SPI()
tft_cs = board.D5
tft_dc = board.D6
tft_cs = board.D9
tft_dc = board.D10

displayio.release_displays()
display_bus = displayio.FourWire(spi, command=tft_dc, chip_select=tft_cs)
Expand All @@ -52,14 +52,9 @@ Usage Example
color_palette = displayio.Palette(1)
color_palette[0] = 0xFF0000

try:
bg_sprite = displayio.TileGrid(color_bitmap,
pixel_shader=color_palette,
position=(0, 0))
except TypeError:
bg_sprite = displayio.TileGrid(color_bitmap,
pixel_shader=color_palette,
x=0, y=0)
bg_sprite = displayio.TileGrid(color_bitmap,
pixel_shader=color_palette,
x=0, y=0)
splash.append(bg_sprite)

while True:
Expand Down
2 changes: 1 addition & 1 deletion adafruit_hx8357.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_HX8357.git"

_INIT_SEQUENCE = (
b"\x01\x80\x0A" # _SWRESET and Delay 10ms
b"\x01\x80\x64" # _SWRESET and Delay 100ms
b"\xB9\x83\xFF\x83\x57\xFF" # _SETC and delay 500ms
b"\xB3\x04\x80\x00\x06\x06" # _SETRGB 0x80 enables SDO pin (0x00 disables)
b"\xB6\x01\x25" # _SETCOM -1.52V
Expand Down
21 changes: 8 additions & 13 deletions examples/hx8357_simpletest.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
"""
This test will initialize the display using displayio
and draw a solid red background
"""
This test will initialize the display using displayio
and draw a solid red background
"""

import board
import displayio
from adafruit_hx8357 import HX8357

spi = board.SPI()
tft_cs = board.D5
tft_dc = board.D6
tft_cs = board.D9
tft_dc = board.D10

displayio.release_displays()
display_bus = displayio.FourWire(spi, command=tft_dc, chip_select=tft_cs)
Expand All @@ -24,14 +24,9 @@
color_palette = displayio.Palette(1)
color_palette[0] = 0xFF0000

try:
bg_sprite = displayio.TileGrid(color_bitmap,
pixel_shader=color_palette,
position=(0, 0))
except TypeError:
bg_sprite = displayio.TileGrid(color_bitmap,
pixel_shader=color_palette,
x=0, y=0)
bg_sprite = displayio.TileGrid(color_bitmap,
pixel_shader=color_palette,
x=0, y=0)
splash.append(bg_sprite)

while True:
Expand Down