diff --git a/README.rst b/README.rst index 14b160d..8e8e19d 100644 --- a/README.rst +++ b/README.rst @@ -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) @@ -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: diff --git a/adafruit_hx8357.py b/adafruit_hx8357.py index b5858ac..09afb7e 100755 --- a/adafruit_hx8357.py +++ b/adafruit_hx8357.py @@ -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 diff --git a/examples/hx8357_simpletest.py b/examples/hx8357_simpletest.py index 66b5acc..820cea0 100644 --- a/examples/hx8357_simpletest.py +++ b/examples/hx8357_simpletest.py @@ -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) @@ -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: