Skip to content

Commit

Permalink
See 2023-11-29 CHANGELOG.md
Browse files Browse the repository at this point in the history
  • Loading branch information
russhughes committed Nov 30, 2023
1 parent 67b7306 commit 98bc3a1
Show file tree
Hide file tree
Showing 344 changed files with 32,210 additions and 9,697 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ __pycache__
*.o
*.P
.history
*.mpy
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
2023-11-29
----------

- Changed examples to use the same source code, with different
`tft_config.py` and `tft_buttons.py` modules. This is to make it easier to support additional devices and configurations.
- Added `tft_buttons.py` modules to support the buttons.
- Added `tft_config.py` modules to support different configurations.
- Added examples to demonstrate and test new features.
- Changed `text()` method to user micropython.viper to improve performance.
- Added `polygon()` method to draw polygons with optional rotation. This is not fast, but it works.
- Added `make-example.py` script to generate documentation for examples, configs and utilities.
- Added documentation for examples, configs and utilities extracted from docstrings using `make-example.py`.
- Added color_order parameter to st7789py to allow different color orders.
- Added custom_init parameter to st7789py to allow custom initialization of the display.
- Added custom_rotation parameter to st7789py to allow custom display sizes, rotations and byte swapping for color data.
- Added `pbitmap` method to support drawing bitmap graphics one line at a time.
- Added `examples/upload_all.sh` script to upload all examples to the board.
- Added `run_all.sh` script to run all examples on the board.
- Updated and improved documentation.
41 changes: 21 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
Python ST7789 driver for MicroPython
====================================
MicroPython LCD Driver in Python
================================

This is a fork of devbis' st7789py_mpy module from
https://github.com/devbis/st7789py_mpy.

This driver has support for:

- 320x240, 240x240, 135x240, and 128x128 pixel displays
- 320x240, 240x240, 135x240, and 128x128 pixel and other displays
- RGB and BGR Color Orders
- Display rotation
- Hardware based scrolling
Expand All @@ -15,27 +15,28 @@ This driver has support for:
- Drawing converted bitmaps

This is a work in progress. Documentation can be found in the docs directory
and at https://penfold.owt.com/st7789py.
and at https://russhughes.github.io/st7789py_mpy/


Examples
--------

See the examples directory for example programs that run on:

- M5STACK AtomS3
- Generic ESP32 connected to a 320x240 display
- LILYGO® TTGO T-Display
- LILYGO® TTGO T-Display RP2040
- Raspberry Pi Pico
- Waveshare 1.3"
- Waveshare 1.14"

Fonts
-----

See the subdirectories in the fonts directory for the converted font modules
used in the examples. These modules can be compiled using the mpy-cross
compiler before uploading to save memory.


- ESP32
- Generic ESP32 320x240
- LilyGo T-DISPLAY 135x240
- LilyGo T-Dongle-S3 80x160 (ST7735)
- LilyGo T-embed 170x320
- LILYGO T-QT Pro 128x128 (GC9107)
- M5STACK AtomS3 128x128 (GC9107)
- M5STACK CORE2 320x240 (ILI9342)
- M5STACK CORE 320x240 (ILI9342)
- M5STACK CoreS3 320x240 (ILI9342)

- RP2040
- LilyGo T-DISPLAY RP2040 135x240
- RP2040-Touch-LCD-1.28 240x240 (GC9A01)
- Waveshare Pico LCD 1.14 135x240
- Waveshare Pico LCD 1.3 240x240
- Waveshare Pico LCD 2 240x320
2 changes: 1 addition & 1 deletion docs/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 354224033269ae3498edec28eb943172
config: 10d3fe7b78c477da90fd28fc9c006e17
tags: 645f666f9bcd5a90fca523b33c5a78b7
Binary file added docs/_images/alien.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/boxlines.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/chango.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/color_test.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/colorbars.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/feathers.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/fonts.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/hello.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/noto_fonts.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/proverbs.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/roids.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/rotations.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/scroll.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/tiny_hello.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/tiny_toasters.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
171 changes: 133 additions & 38 deletions docs/_modules/index.html

Large diffs are not rendered by default.

1,073 changes: 603 additions & 470 deletions docs/_modules/st7789py.html

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions docs/_sources/configs.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.. toctree::
:glob:

configs/*
27 changes: 27 additions & 0 deletions docs/_sources/configs/atom_s3.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
.. _../tft_configs/atom_s3:

M5STACK AtomS3 128x128 (GC9107)
===============================


https://docs.m5stack.com/en/core/AtomS3

tft_configs/atom_s3/tft_config.py
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. literalinclude:: ../../../tft_configs/atom_s3/tft_config.py
:language: python
:linenos:
:lines: 1-


tft_configs/atom_s3/tft_buttons.py
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

M5STACK AtomS3 buttons

.. literalinclude:: ../../../tft_configs/atom_s3/tft_buttons.py
:language: python
:linenos:
:lines: 1-

26 changes: 26 additions & 0 deletions docs/_sources/configs/esp32_320x240.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
.. _../tft_configs/esp32_320x240:

Generic ESP32 320x240
=====================



tft_configs/esp32_320x240/tft_config.py
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. literalinclude:: ../../../tft_configs/esp32_320x240/tft_config.py
:language: python
:linenos:
:lines: 1-


tft_configs/esp32_320x240/tft_buttons.py
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Generic ESP32 with Two buttons

.. literalinclude:: ../../../tft_configs/esp32_320x240/tft_buttons.py
:language: python
:linenos:
:lines: 1-

34 changes: 34 additions & 0 deletions docs/_sources/configs/m5stack_core.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
.. _../tft_configs/m5stack_core:

M5STACK CORE 320x240 (ILI9342)
==============================



tft_configs/m5stack_core/tft_config.py
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. literalinclude:: ../../../tft_configs/m5stack_core/tft_config.py
:language: python
:linenos:
:lines: 1-


tft_configs/m5stack_core/tft_buttons.py
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Buttons class for examples, modify for your device.

Attributes:
name (str): The name of the device.
left (Pin): The Pin object representing the left button.
right (Pin): The Pin object representing the right button.
fire (Pin): The Pin object representing the fire button.
thrust (Pin): The Pin object representing the thrust button.
hyper (Pin): The Pin object representing the hyper button.

.. literalinclude:: ../../../tft_configs/m5stack_core/tft_buttons.py
:language: python
:linenos:
:lines: 1-

30 changes: 30 additions & 0 deletions docs/_sources/configs/m5stack_core2.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
.. _../tft_configs/m5stack_core2:

M5STACK CORE2 320x240 (ILI9342)
===============================



tft_configs/m5stack_core2/tft_config.py
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. literalinclude:: ../../../tft_configs/m5stack_core2/tft_config.py
:language: python
:linenos:
:lines: 1-


tft_configs/m5stack_core2/tft_buttons.py
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


from machine import Pin


class Buttons:

.. literalinclude:: ../../../tft_configs/m5stack_core2/tft_buttons.py
:language: python
:linenos:
:lines: 1-

34 changes: 34 additions & 0 deletions docs/_sources/configs/m5stack_core3.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
.. _../tft_configs/m5stack_core3:

M5STACK CoreS3 320x240 (ILI9342)
================================



tft_configs/m5stack_core3/tft_config.py
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. literalinclude:: ../../../tft_configs/m5stack_core3/tft_config.py
:language: python
:linenos:
:lines: 1-


tft_configs/m5stack_core3/tft_buttons.py
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Buttons class for examples, modify for your device.

Attributes:
name (str): The name of the device.
left (Pin): The Pin object representing the left button.
right (Pin): The Pin object representing the right button.
fire (Pin): The Pin object representing the fire button.
thrust (Pin): The Pin object representing the thrust button.
hyper (Pin): The Pin object representing the hyper button.

.. literalinclude:: ../../../tft_configs/m5stack_core3/tft_buttons.py
:language: python
:linenos:
:lines: 1-

30 changes: 30 additions & 0 deletions docs/_sources/configs/rp2040_touch_lcd_128.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
.. _../tft_configs/rp2040_touch_lcd_128:

RP2040-Touch-LCD-1.28 240x240 (GC9A01)
======================================



tft_configs/rp2040_touch_lcd_128/tft_config.py
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. literalinclude:: ../../../tft_configs/rp2040_touch_lcd_128/tft_config.py
:language: python
:linenos:
:lines: 1-


tft_configs/rp2040_touch_lcd_128/tft_buttons.py
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


from machine import Pin


class Buttons:

.. literalinclude:: ../../../tft_configs/rp2040_touch_lcd_128/tft_buttons.py
:language: python
:linenos:
:lines: 1-

26 changes: 26 additions & 0 deletions docs/_sources/configs/t-dongle-s3.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
.. _../tft_configs/t-dongle-s3:

LilyGo T-Dongle-S3 80x160 (ST7735)
==================================



tft_configs/t-dongle-s3/tft_config.py
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. literalinclude:: ../../../tft_configs/t-dongle-s3/tft_config.py
:language: python
:linenos:
:lines: 1-


tft_configs/t-dongle-s3/tft_buttons.py
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^



.. literalinclude:: ../../../tft_configs/t-dongle-s3/tft_buttons.py
:language: python
:linenos:
:lines: 1-

34 changes: 34 additions & 0 deletions docs/_sources/configs/t-embed.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
.. _../tft_configs/t-embed:

LilyGo T-embed 170x320
======================



tft_configs/t-embed/tft_config.py
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. literalinclude:: ../../../tft_configs/t-embed/tft_config.py
:language: python
:linenos:
:lines: 1-


tft_configs/t-embed/tft_buttons.py
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Buttons class for examples, modify for your device.

Attributes:
name (str): The name of the device.
left (Pin): The Pin object representing the left button.
right (Pin): The Pin object representing the right button.
fire (Pin): The Pin object representing the fire button.
thrust (Pin): The Pin object representing the thrust button.
hyper (Pin): The Pin object representing the hyper button.

.. literalinclude:: ../../../tft_configs/t-embed/tft_buttons.py
:language: python
:linenos:
:lines: 1-

27 changes: 27 additions & 0 deletions docs/_sources/configs/t_qt_pro.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
.. _../tft_configs/t_qt_pro:

LilyGo T-QT Pro 128x128 (GC9107)
================================


https://www.lilygo.cc/products/t-qt-pro

tft_configs/t_qt_pro/tft_config.py
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. literalinclude:: ../../../tft_configs/t_qt_pro/tft_config.py
:language: python
:linenos:
:lines: 1-


tft_configs/t_qt_pro/tft_buttons.py
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

LILYGO® T-QT Pro buttons

.. literalinclude:: ../../../tft_configs/t_qt_pro/tft_buttons.py
:language: python
:linenos:
:lines: 1-

Loading

0 comments on commit 98bc3a1

Please sign in to comment.