├── .gitignore
├── LICENSE
├── README.md
├── VERSION
├── docs
├── .nojekyll
├── GC9A01.jpg
├── _images
│ ├── alien.png
│ ├── arcs.png
│ ├── bitarray.png
│ ├── bluemarble.png
│ ├── chango.png
│ ├── feathers.png
│ ├── fonts.png
│ ├── hello.png
│ ├── hello_world.png
│ ├── hershey.png
│ ├── lines.png
│ ├── mono_fonts.png
│ ├── noto_fonts.png
│ ├── pinball.png
│ ├── proverbs.png
│ ├── roids.png
│ ├── rotations.png
│ ├── tiny_toasters.png
│ ├── toasters.png
│ ├── vga1_16x16.png
│ ├── vga1_16x32.png
│ ├── vga1_8x16.png
│ ├── vga1_8x8.png
│ ├── vga1_bold_16x16.png
│ ├── vga1_bold_16x32.png
│ ├── vga2_16x16.png
│ ├── vga2_16x32.png
│ ├── vga2_8x16.png
│ ├── vga2_8x8.png
│ ├── vga2_bold_16x16.png
│ ├── vga2_bold_16x32.png
│ └── watch.png
├── _sources
│ ├── building.rst.txt
│ ├── configs.rst.txt
│ ├── configs
│ │ ├── ESP32-S3-LCD-1.28_config.rst.txt
│ │ ├── RP2-Dual-Display_config.rst.txt
│ │ ├── RP2040-Touch-LCD-1.28_config.rst.txt
│ │ └── RP2_config.rst.txt
│ ├── examples.rst.txt
│ ├── examples
│ │ ├── alien.rst.txt
│ │ ├── arcs.rst.txt
│ │ ├── bitarray.rst.txt
│ │ ├── bluemarble.rst.txt
│ │ ├── chango.rst.txt
│ │ ├── feathers.rst.txt
│ │ ├── fonts.rst.txt
│ │ ├── hello.rst.txt
│ │ ├── hello_world.rst.txt
│ │ ├── hershey.rst.txt
│ │ ├── jpg_test.rst.txt
│ │ ├── lines.rst.txt
│ │ ├── mono_fonts.rst.txt
│ │ ├── noto_fonts.rst.txt
│ │ ├── pinball.rst.txt
│ │ ├── proverbs.rst.txt
│ │ ├── roids.rst.txt
│ │ ├── rotations.rst.txt
│ │ ├── scroll.rst.txt
│ │ ├── tiny_toasters.rst.txt
│ │ ├── toasters.rst.txt
│ │ └── watch.rst.txt
│ ├── fonts.rst.txt
│ ├── gc9a01.rst.txt
│ ├── genindex.rst.txt
│ ├── index.rst.txt
│ ├── utils.rst.txt
│ └── utils
│ │ ├── create_png_examples.rst.txt
│ │ ├── image_converter.rst.txt
│ │ ├── sprites_converter.rst.txt
│ │ ├── text_font_converter.rst.txt
│ │ └── write_font_converter.rst.txt
├── _static
│ ├── GC9A01.jpg
│ ├── _sphinx_javascript_frameworks_compat.js
│ ├── alien.bmp
│ ├── alien.png
│ ├── arcs.bmp
│ ├── arcs.png
│ ├── astrol.svg
│ ├── basic.css
│ ├── bitarray.bmp
│ ├── bitarray.png
│ ├── bluemarble.bmp
│ ├── bluemarble.png
│ ├── chango.bmp
│ ├── chango.png
│ ├── css
│ │ ├── badge_only.css
│ │ ├── fonts
│ │ │ ├── Roboto-Slab-Bold.woff
│ │ │ ├── Roboto-Slab-Bold.woff2
│ │ │ ├── Roboto-Slab-Regular.woff
│ │ │ ├── Roboto-Slab-Regular.woff2
│ │ │ ├── fontawesome-webfont.eot
│ │ │ ├── fontawesome-webfont.svg
│ │ │ ├── fontawesome-webfont.ttf
│ │ │ ├── fontawesome-webfont.woff
│ │ │ ├── fontawesome-webfont.woff2
│ │ │ ├── lato-bold-italic.woff
│ │ │ ├── lato-bold-italic.woff2
│ │ │ ├── lato-bold.woff
│ │ │ ├── lato-bold.woff2
│ │ │ ├── lato-normal-italic.woff
│ │ │ ├── lato-normal-italic.woff2
│ │ │ ├── lato-normal.woff
│ │ │ └── lato-normal.woff2
│ │ └── theme.css
│ ├── cyrilc.svg
│ ├── doctools.js
│ ├── documentation_options.js
│ ├── feathers.png
│ ├── file.png
│ ├── fonts.bmp
│ ├── fonts.png
│ ├── gotheng.svg
│ ├── gothger.svg
│ ├── gothita.svg
│ ├── greekc.svg
│ ├── greekcs.svg
│ ├── greekp.svg
│ ├── greeks.svg
│ ├── hello.png
│ ├── hello_world.jpeg
│ ├── hello_world.png
│ ├── hershey.png
│ ├── italicc.svg
│ ├── italiccs.svg
│ ├── italict.svg
│ ├── japan.svg
│ ├── jpg_test.bmp
│ ├── jpg_test.png
│ ├── jquery.js
│ ├── js
│ │ ├── badge_only.js
│ │ ├── html5shiv-printshiv.min.js
│ │ ├── html5shiv.min.js
│ │ └── theme.js
│ ├── language_data.js
│ ├── lines.bmp
│ ├── lines.png
│ ├── lowmat.svg
│ ├── marker.svg
│ ├── meteo.svg
│ ├── minus.png
│ ├── misc.svg
│ ├── mono_fonts.bmp
│ ├── mono_fonts.png
│ ├── music.svg
│ ├── noto_fonts.bmp
│ ├── noto_fonts.png
│ ├── pinball.png
│ ├── plus.png
│ ├── proverbs.bmp
│ ├── proverbs.png
│ ├── pygments.css
│ ├── roids.png
│ ├── romanc.svg
│ ├── romancs.svg
│ ├── romand.svg
│ ├── romanp.svg
│ ├── romans.svg
│ ├── romant.svg
│ ├── rotations.png
│ ├── scriptc.svg
│ ├── scripts.svg
│ ├── scroll.png
│ ├── searchtools.js
│ ├── sphinx_highlight.js
│ ├── symbol.svg
│ ├── test.png
│ ├── tiny_toasters.bmp
│ ├── tiny_toasters.png
│ ├── toasters.bmp
│ ├── toasters.png
│ ├── uppmat.svg
│ ├── vga1_16x16.png
│ ├── vga1_16x32.png
│ ├── vga1_8x16.png
│ ├── vga1_8x8.png
│ ├── vga1_bold_16x16.png
│ ├── vga1_bold_16x32.png
│ ├── vga2_16x16.png
│ ├── vga2_16x32.png
│ ├── vga2_8x16.png
│ ├── vga2_8x8.png
│ ├── vga2_bold_16x16.png
│ ├── vga2_bold_16x32.png
│ └── watch.png
├── building.html
├── configs.html
├── configs
│ ├── ESP32-S3-LCD-1.28_config.html
│ ├── RP2-Dual-Display_config.html
│ ├── RP2040-Touch-LCD-1.28_config.html
│ └── RP2_config.html
├── examples.html
├── examples
│ ├── alien.html
│ ├── arcs.html
│ ├── bitarray.html
│ ├── bluemarble.html
│ ├── chango.html
│ ├── feathers.html
│ ├── fonts.html
│ ├── hello.html
│ ├── hello_world.html
│ ├── hershey.html
│ ├── jpg_test.html
│ ├── lines.html
│ ├── mono_fonts.html
│ ├── noto_fonts.html
│ ├── pinball.html
│ ├── proverbs.html
│ ├── roids.html
│ ├── rotations.html
│ ├── scroll.html
│ ├── tiny_toasters.html
│ ├── toasters.html
│ └── watch.html
├── fonts.html
├── gc9a01.html
├── genindex.html
├── index.html
├── objects.inv
├── search.html
├── searchindex.js
├── utils.html
└── utils
│ ├── create_png_examples.html
│ ├── image_converter.html
│ ├── sprites_converter.html
│ ├── text_font_converter.html
│ └── write_font_converter.html
├── examples
├── arcs.py
├── bitarray.py
├── circle.py
├── feathers.py
├── fonts.py
├── hello.py
├── hello_world.py
├── hershey.py
├── jpg
│ ├── alien.jpg
│ ├── alien.py
│ ├── bigbuckbunny.jpg
│ ├── bluemarble.jpg
│ ├── jpg_test.py
│ └── wi-alien.svg
├── lines.py
├── mask.png
├── mono_fonts
│ ├── LICENSE_OFL.txt
│ ├── inconsolata-700.ttf
│ ├── inconsolata_16.py
│ ├── inconsolata_32.py
│ ├── inconsolata_64.py
│ └── mono_fonts.py
├── noto_fonts
│ ├── LICENSE_OFL.txt
│ ├── NotoSans-Regular.ttf
│ ├── NotoSansMono-Regular.ttf
│ ├── NotoSansMono_32.py
│ ├── NotoSans_32.py
│ ├── NotoSerif-Regular.ttf
│ ├── NotoSerif_32.py
│ └── noto_fonts.py
├── pbitmap
│ ├── bluemarble.jpg
│ ├── bluemarble.py
│ └── bluemarble_bitmap.py
├── pinball.py
├── prop_fonts
│ ├── Chango-Regular.ttf
│ ├── LICENSE_OFL.txt
│ ├── chango.py
│ ├── chango_16.py
│ ├── chango_32.py
│ └── chango_64.py
├── proverbs
│ ├── NotoSansSC-Regular.otf
│ ├── make_proverbs_fonts.sh
│ ├── proverbs.py
│ └── proverbs_20.py
├── roids.py
├── rotations.py
├── scroll.py
├── tiny_toasters
│ ├── make_tiny_toast_bitmaps.sh
│ ├── tiny_toasters.bmp
│ ├── tiny_toasters.py
│ └── tiny_toasters_bitmaps.py
├── toasters
│ ├── maketoast
│ ├── t1.png
│ ├── t1.py
│ ├── t1x.py
│ ├── t2.png
│ ├── t2.py
│ ├── t2x.py
│ ├── t3.png
│ ├── t3.py
│ ├── t3x.py
│ ├── t4.png
│ ├── t4.py
│ ├── t4x.py
│ ├── t5.png
│ ├── t5.py
│ ├── t5x.py
│ ├── toast_bitmaps.py
│ ├── toasters.bmp
│ └── toasters.py
└── watch
│ ├── LibreBaskerville-Regular.ttf
│ ├── create_face_jpg.py
│ ├── face_128x128.jpg
│ ├── face_160x128.jpg
│ ├── face_240x135.jpg
│ ├── face_240x240.jpg
│ ├── face_320x240.jpg
│ └── watch.py
├── firmware
├── ADAFRUIT_FEATHER_RP2040
│ └── firmware.uf2
├── ADAFRUIT_ITSYBITSY_RP2040
│ └── firmware.uf2
├── ADAFRUIT_QTPY_RP2040
│ └── firmware.uf2
├── ARDUINO_NANO_ESP32
│ └── firmware.bin
├── ARDUINO_NANO_RP2040_CONNECT
│ └── firmware.uf2
├── ESP32_GENERIC
│ ├── firmware_16MiB.bin
│ ├── firmware_32MiB.bin
│ ├── firmware_4MiB.bin
│ ├── firmware_8MiB.bin
│ ├── firmware_SPIRAM_16MiB.bin
│ ├── firmware_SPIRAM_32MiB.bin
│ ├── firmware_SPIRAM_4MiB.bin
│ ├── firmware_SPIRAM_8MiB.bin
│ ├── firmware_UNICORE_16MiB.bin
│ ├── firmware_UNICORE_32MiB.bin
│ ├── firmware_UNICORE_4MiB.bin
│ └── firmware_UNICORE_8MiB.bin
├── ESP32_GENERIC_C3
│ ├── firmware_16MiB.bin
│ ├── firmware_32MiB.bin
│ ├── firmware_4MiB.bin
│ └── firmware_8MiB.bin
├── ESP32_GENERIC_S2
│ ├── firmware_16MiB.bin
│ ├── firmware_32MiB.bin
│ ├── firmware_4MiB.bin
│ └── firmware_8MiB.bin
├── ESP32_GENERIC_S3
│ ├── firmware_16MiB.bin
│ ├── firmware_32MiB.bin
│ ├── firmware_4MiB.bin
│ ├── firmware_8MiB.bin
│ ├── firmware_SPIRAM_OCT_16MiB.bin
│ ├── firmware_SPIRAM_OCT_32MiB.bin
│ ├── firmware_SPIRAM_OCT_4MiB.bin
│ └── firmware_SPIRAM_OCT_8MiB.bin
├── GARATRONIC_PYBSTICK26_RP2040
│ └── firmware.uf2
├── LILYGO_TTGO_LORA32
│ └── firmware.bin
├── LOLIN_C3_MINI
│ └── firmware.bin
├── LOLIN_S2_MINI
│ └── firmware.bin
├── LOLIN_S2_PICO
│ └── firmware.bin
├── M5STACK_ATOM
│ └── firmware.bin
├── NULLBITS_BIT_C_PRO
│ └── firmware.uf2
├── OLIMEX_ESP32_POE
│ └── firmware.bin
├── PIMORONI_PICOLIPO_16MB
│ └── firmware.uf2
├── PIMORONI_PICOLIPO_4MB
│ └── firmware.uf2
├── PIMORONI_TINY2040
│ └── firmware.uf2
├── README.md
├── RPI_PICO
│ └── firmware.uf2
├── RPI_PICO2
│ └── firmware.uf2
├── RPI_PICO2_W
│ └── firmware.uf2
├── RPI_PICO_W
│ └── firmware.uf2
├── SIL_RP2040_SHIM
│ └── firmware.uf2
├── SIL_WESP32
│ └── firmware.bin
├── SPARKFUN_PROMICRO
│ └── firmware.uf2
├── SPARKFUN_THINGPLUS
│ └── firmware.uf2
├── UM_FEATHERS2
│ └── firmware.bin
├── UM_FEATHERS2NEO
│ └── firmware.bin
├── UM_FEATHERS3
│ └── firmware.bin
├── UM_NANOS3
│ └── firmware.bin
├── UM_PROS3
│ └── firmware.bin
├── UM_TINYPICO
│ └── firmware.bin
├── UM_TINYS2
│ └── firmware.bin
├── UM_TINYS3
│ └── firmware.bin
├── UM_TINYWATCHS3
│ └── firmware.bin
├── W5100S_EVB_PICO
│ └── firmware.uf2
├── W5500_EVB_PICO
│ └── firmware.uf2
└── WEACTSTUDIO
│ ├── firmware.uf2
│ ├── firmware_FLASH_2MB.uf2
│ ├── firmware_FLASH_4MB.uf2
│ └── firmware_FLASH_8MB.uf2
├── fonts
├── bitmap
│ ├── README.md
│ ├── vga1_16x16.py
│ ├── vga1_16x32.py
│ ├── vga1_8x16.py
│ ├── vga1_8x8.py
│ ├── vga1_bold_16x16.py
│ ├── vga1_bold_16x32.mpy
│ ├── vga1_bold_16x32.py
│ ├── vga2_16x16.py
│ ├── vga2_16x32.py
│ ├── vga2_8x16.py
│ ├── vga2_8x8.py
│ ├── vga2_bold_16x16.py
│ ├── vga2_bold_16x32.py
│ ├── vga_8x16.bin
│ └── vga_8x8.bin
└── vector
│ ├── README.md
│ ├── astrol.py
│ ├── cyrilc.py
│ ├── gotheng.py
│ ├── gothger.py
│ ├── gothita.py
│ ├── greekc.py
│ ├── greekcs.py
│ ├── greekp.py
│ ├── greeks.py
│ ├── italicc.py
│ ├── italiccs.py
│ ├── italict.py
│ ├── lowmat.py
│ ├── marker.py
│ ├── meteo.py
│ ├── music.py
│ ├── romanc.py
│ ├── romancs.py
│ ├── romand.py
│ ├── romanp.py
│ ├── romans.py
│ ├── romant.py
│ ├── scriptc.py
│ ├── scripts.py
│ ├── symbol.py
│ └── uppmat.py
├── manifest.py
├── micropython.mk
├── modules
├── NotoSansMono_32.py
├── NotoSans_32.py
├── NotoSerif_32.py
├── axp202c.py
├── df.py
├── focaltouch.py
├── greekc.py
├── greekcs.py
├── greekp.py
├── greeks.py
├── inconsolata_16.py
├── inconsolata_32.py
├── italicc.py
├── italiccs.py
├── italict.py
├── marker.py
├── meteo.py
├── mf.py
├── music.py
├── romanc.py
├── romancs.py
├── romand.py
├── romanp.py
├── romans.py
├── romant.py
├── scriptc.py
├── scripts.py
├── sdcard.py
├── symbol.py
├── vga1_16x16.py
├── vga1_16x32.py
├── vga1_8x16.py
├── vga1_8x8.py
├── vga1_bold_16x16.py
├── vga1_bold_16x32.py
├── vga2_16x16.py
├── vga2_8x16.py
├── vga2_8x8.py
├── vga2_bold_16x16.py
└── vga2_bold_16x32.py
├── sphinx
├── Makefile
├── _static
│ ├── GC9A01.jpg
│ ├── alien.bmp
│ ├── alien.png
│ ├── arcs.bmp
│ ├── arcs.png
│ ├── astrol.svg
│ ├── bitarray.bmp
│ ├── bitarray.png
│ ├── bluemarble.bmp
│ ├── bluemarble.png
│ ├── chango.bmp
│ ├── chango.png
│ ├── cyrilc.svg
│ ├── feathers.png
│ ├── fonts.bmp
│ ├── fonts.png
│ ├── gotheng.svg
│ ├── gothger.svg
│ ├── gothita.svg
│ ├── greekc.svg
│ ├── greekcs.svg
│ ├── greekp.svg
│ ├── greeks.svg
│ ├── hello.png
│ ├── hello_world.jpeg
│ ├── hello_world.png
│ ├── hershey.png
│ ├── italicc.svg
│ ├── italiccs.svg
│ ├── italict.svg
│ ├── japan.svg
│ ├── jpg_test.bmp
│ ├── jpg_test.png
│ ├── lines.bmp
│ ├── lines.png
│ ├── lowmat.svg
│ ├── marker.svg
│ ├── meteo.svg
│ ├── misc.svg
│ ├── mono_fonts.bmp
│ ├── mono_fonts.png
│ ├── music.svg
│ ├── noto_fonts.bmp
│ ├── noto_fonts.png
│ ├── pinball.png
│ ├── proverbs.bmp
│ ├── proverbs.png
│ ├── roids.png
│ ├── romanc.svg
│ ├── romancs.svg
│ ├── romand.svg
│ ├── romanp.svg
│ ├── romans.svg
│ ├── romant.svg
│ ├── rotations.png
│ ├── scriptc.svg
│ ├── scripts.svg
│ ├── scroll.png
│ ├── symbol.svg
│ ├── test.png
│ ├── tiny_toasters.bmp
│ ├── tiny_toasters.png
│ ├── toasters.bmp
│ ├── toasters.png
│ ├── uppmat.svg
│ ├── vga1_16x16.png
│ ├── vga1_16x32.png
│ ├── vga1_8x16.png
│ ├── vga1_8x8.png
│ ├── vga1_bold_16x16.png
│ ├── vga1_bold_16x32.png
│ ├── vga2_16x16.png
│ ├── vga2_16x32.png
│ ├── vga2_8x16.png
│ ├── vga2_8x8.png
│ ├── vga2_bold_16x16.png
│ ├── vga2_bold_16x32.png
│ └── watch.png
├── building.rst
├── conf.py
├── configs.rst
├── configs
│ ├── ESP32-S3-LCD-1.28_config.rst
│ ├── RP2-Dual-Display_config.rst
│ ├── RP2040-Touch-LCD-1.28_config.rst
│ └── RP2_config.rst
├── examples.rst
├── examples
│ ├── alien.rst
│ ├── arcs.rst
│ ├── bitarray.rst
│ ├── bluemarble.rst
│ ├── chango.rst
│ ├── feathers.rst
│ ├── fonts.rst
│ ├── hello.rst
│ ├── hello_world.rst
│ ├── hershey.rst
│ ├── jpg_test.rst
│ ├── lines.rst
│ ├── mono_fonts.rst
│ ├── noto_fonts.rst
│ ├── pinball.rst
│ ├── proverbs.rst
│ ├── roids.rst
│ ├── rotations.rst
│ ├── scroll.rst
│ ├── tiny_toasters.rst
│ ├── toasters.rst
│ └── watch.rst
├── fonts.rst
├── gc9a01.rst
├── genindex.rst
├── index.rst
├── make.bat
├── romfont.py
├── truetype.py
├── update_docs.sh
├── utils.rst
└── utils
│ ├── create_png_examples.rst
│ ├── image_converter.rst
│ ├── sprites_converter.rst
│ ├── text_font_converter.rst
│ └── write_font_converter.rst
├── src
├── .clang-format
├── gc9a01.c
├── gc9a01.h
├── micropython.cmake
├── micropython.mk
├── mpfile.c
├── mpfile.h
├── tjpgd565.c
└── tjpgd565.h
├── tft_configs
├── ESP32-S3-LCD-1.28
│ ├── tft_buttons.py
│ └── tft_config.py
├── README.md
├── RP2-Dual-Display
│ ├── tft_buttons.py
│ ├── tft_config0.py
│ └── tft_config1.py
├── RP2
│ ├── tft_buttons.py
│ └── tft_config.py
└── RP2040-Touch-LCD-1.28
│ ├── tft_buttons.py
│ └── tft_config.py
├── uncrustify.cfg
└── utils
├── create_png_examples.py
├── howto-convert-jpgs.md
├── image_converter.py
├── requirements.txt
├── sprites_converter.py
├── text_font_converter.py
└── write_font_converter.py
/.gitignore:
--------------------------------------------------------------------------------
1 | .vscode
2 | .idea
3 | __pycache__
4 | sphinx/_build
5 | sphinx/_static/BAK
6 | pics/OLD
7 | *~
8 | *.pyc
9 | *.o
10 | *.P
11 | *.mpy
12 | .DS_Store
13 | .history
14 | TODO.md
15 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 |
2 | Copyright (c) 2020, 2021, 2022 Russ Hughes
3 |
4 | These files incorporate work covered by the following copyright and
5 | permission notice and are licensed under the same terms:
6 |
7 | The MIT License (MIT)
8 |
9 | Copyright (c) 2019 Ivan Belokobylskiy
10 |
11 | Permission is hereby granted, free of charge, to any person obtaining a copy
12 | of this software and associated documentation files (the "Software"), to deal
13 | in the Software without restriction, including without limitation the rights
14 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15 | copies of the Software, and to permit persons to whom the Software is
16 | furnished to do so, subject to the following conditions:
17 |
18 | The above copyright notice and this permission notice shall be included in
19 | all copies or substantial portions of the Software.
20 |
21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
27 | THE SOFTWARE.
28 |
29 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # GC9A01 Display Driver for MicroPython
2 |
3 |
4 |
5 |
6 |
7 | This driver is based on [devbis' st7789_mpy driver.](https://github.com/devbis/st7789_mpy)
8 | I modified the original driver for one of my projects to add:
9 |
10 | - Display Rotation.
11 | - Scrolling
12 | - Writing text using bitmaps converted from True Type fonts
13 | - Drawing text using 8 and 16 bit wide bitmap fonts
14 | - Drawing text using Hershey vector fonts
15 | - Drawing JPG's, including a SLOW mode to draw jpg's larger than available ram
16 | using the TJpgDec - Tiny JPEG Decompressor R0.01d. from
17 | http://elm-chan.org/fsw/tjpgd/00index.html
18 |
19 | Included are 12 bitmap fonts derived from classic pc text mode fonts, 26 Hershey vector fonts and several example programs for different devices. The driver supports 240x240 displays.
20 |
21 | ## Documentation
22 |
23 | Documentation can be found in the docs directory and at https://russhughes.github.io/gc9a01_mpy/
24 |
25 | ## Pre-compiled firmware files
26 |
27 | The firmware directory contains pre-compiled firmware for various devices with the gc9a01 C driver and frozen python font files. See the README.md file in the fonts folder for more information on the font files.
28 |
29 | ### ESP32 BOARDS firmware
30 |
31 | - ARDUINO_NANO_ESP32
32 | - ESP32_GENERIC with 4, 8, 16, or 32MB flash
33 | - ESP32_GENERIC_C3 with 4, 8, 16, or 32MB flash
34 | - ESP32_GENERIC_S2 with 4, 8, 16, or 32MB flash
35 | - ESP32_GENERIC_S3 with 4, 8, 16, or 32MB flash
36 | - LILYGO_TTGO_LORA32
37 | - LOLIN_C3_MINI
38 | - LOLIN_S2_MINI
39 | - LOLIN_S2_PICO
40 | - M5STACK_ATOM
41 | - OLIMEX_ESP32_POE
42 | - SIL_WESP32
43 | - UM_FEATHERS2
44 | - UM_FEATHERS2NEO
45 | - UM_FEATHERS3
46 | - UM_NANOS3
47 | - UM_PROS3
48 | - UM_TINYPICO
49 | - UM_TINYS2
50 | - UM_TINYS3
51 | - UM_TINYWATCHS3
52 |
53 | ### RP2040 BOARDS firmware
54 |
55 | - ADAFRUIT_ITSYBITSY_RP2040
56 | - ADAFRUIT_QTPY_RP2040
57 | - ARDUINO_NANO_RP2040_CONNECT
58 | - ADAFRUIT_FEATHER_RP2040
59 | - GARATRONIC_PYBSTICK26_RP2040
60 | - NULLBITS_BIT_C_PRO
61 | - PIMORONI_PICOLIPO_16MB
62 | - PIMORONI_PICOLIPO_4MB
63 | - PIMORONI_TINY2040
64 | - RPI_PICO
65 | - RPI_PICO_W
66 | - SPARKFUN_PROMICRO
67 | - SPARKFUN_THINGPLUS
68 | - W5100S_EVB_PICO
69 | - W5500_EVB_PICO
70 | - WAVESHARE_RP2040_LCD_1.28
71 | - WEACTSTUDIO
72 |
73 | This is a work in progress.
74 |
75 | -- Russ
76 |
--------------------------------------------------------------------------------
/VERSION:
--------------------------------------------------------------------------------
1 | 0.2.0
2 |
--------------------------------------------------------------------------------
/docs/.nojekyll:
--------------------------------------------------------------------------------
1 | For reals, this time.
--------------------------------------------------------------------------------
/docs/GC9A01.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/GC9A01.jpg
--------------------------------------------------------------------------------
/docs/_images/alien.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_images/alien.png
--------------------------------------------------------------------------------
/docs/_images/arcs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_images/arcs.png
--------------------------------------------------------------------------------
/docs/_images/bitarray.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_images/bitarray.png
--------------------------------------------------------------------------------
/docs/_images/bluemarble.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_images/bluemarble.png
--------------------------------------------------------------------------------
/docs/_images/chango.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_images/chango.png
--------------------------------------------------------------------------------
/docs/_images/feathers.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_images/feathers.png
--------------------------------------------------------------------------------
/docs/_images/fonts.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_images/fonts.png
--------------------------------------------------------------------------------
/docs/_images/hello.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_images/hello.png
--------------------------------------------------------------------------------
/docs/_images/hello_world.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_images/hello_world.png
--------------------------------------------------------------------------------
/docs/_images/hershey.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_images/hershey.png
--------------------------------------------------------------------------------
/docs/_images/lines.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_images/lines.png
--------------------------------------------------------------------------------
/docs/_images/mono_fonts.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_images/mono_fonts.png
--------------------------------------------------------------------------------
/docs/_images/noto_fonts.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_images/noto_fonts.png
--------------------------------------------------------------------------------
/docs/_images/pinball.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_images/pinball.png
--------------------------------------------------------------------------------
/docs/_images/proverbs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_images/proverbs.png
--------------------------------------------------------------------------------
/docs/_images/roids.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_images/roids.png
--------------------------------------------------------------------------------
/docs/_images/rotations.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_images/rotations.png
--------------------------------------------------------------------------------
/docs/_images/tiny_toasters.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_images/tiny_toasters.png
--------------------------------------------------------------------------------
/docs/_images/toasters.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_images/toasters.png
--------------------------------------------------------------------------------
/docs/_images/vga1_16x16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_images/vga1_16x16.png
--------------------------------------------------------------------------------
/docs/_images/vga1_16x32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_images/vga1_16x32.png
--------------------------------------------------------------------------------
/docs/_images/vga1_8x16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_images/vga1_8x16.png
--------------------------------------------------------------------------------
/docs/_images/vga1_8x8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_images/vga1_8x8.png
--------------------------------------------------------------------------------
/docs/_images/vga1_bold_16x16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_images/vga1_bold_16x16.png
--------------------------------------------------------------------------------
/docs/_images/vga1_bold_16x32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_images/vga1_bold_16x32.png
--------------------------------------------------------------------------------
/docs/_images/vga2_16x16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_images/vga2_16x16.png
--------------------------------------------------------------------------------
/docs/_images/vga2_16x32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_images/vga2_16x32.png
--------------------------------------------------------------------------------
/docs/_images/vga2_8x16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_images/vga2_8x16.png
--------------------------------------------------------------------------------
/docs/_images/vga2_8x8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_images/vga2_8x8.png
--------------------------------------------------------------------------------
/docs/_images/vga2_bold_16x16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_images/vga2_bold_16x16.png
--------------------------------------------------------------------------------
/docs/_images/vga2_bold_16x32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_images/vga2_bold_16x32.png
--------------------------------------------------------------------------------
/docs/_images/watch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_images/watch.png
--------------------------------------------------------------------------------
/docs/_sources/building.rst.txt:
--------------------------------------------------------------------------------
1 | Building the firmware
2 | =====================
3 |
4 | See the MicroPython `Getting Started `_
5 | for more detailed information on building the MicroPython firmware.
6 |
7 |
8 | Clone the Repositories
9 | ----------------------
10 |
11 | .. code-block:: console
12 |
13 | $ git clone git@github.com:micropython/micropython.git
14 | $ git clone https://github.com/russhughes/gc9a01_mpy.git
15 |
16 | Compile the cross compiler if you haven't already
17 |
18 | .. code-block:: console
19 |
20 | $ make -C micropython/mpy-cross
21 |
22 | .. _buildingr-micropython-114-thru-119:
23 |
24 | ESP32 MicroPython 1.14 thru 1.19
25 | --------------------------------
26 |
27 | Change to the ESP32 port directory
28 |
29 | .. code-block:: console
30 |
31 | $ cd micropython/ports/esp32
32 |
33 | Compile the module with specified USER_C_MODULES dir
34 |
35 | .. code-block:: console
36 |
37 | $ make USER_C_MODULES=../../../../gc9a01_mpy/src/micropython.cmake all
38 |
39 | Erase the target device if this is the first time uploading this
40 | firmware
41 |
42 | .. code-block:: console
43 |
44 | $ make USER_C_MODULES=../../../../gc9a01_mpy/src/micropython.cmake erase
45 |
46 | Upload the new firmware
47 |
48 | .. code-block:: console
49 |
50 | $ make USER_C_MODULES=../../../../gc9a01_mpy/src/micropython.cmake deploy
51 |
52 | .. _building-micropython-120-and-later:
53 |
54 | ESP32 MicroPython 1.20 and later
55 | --------------------------------
56 |
57 | Change to the ESP32 port directory, and build the firmware
58 |
59 | .. code-block:: console
60 |
61 | $ cd micropython/ports/esp32
62 |
63 | $ make \
64 | BOARD=ESP32_GENERIC \
65 | BOARD_VARIANT=SPIRAM \
66 | USER_C_MODULES=../../../../gc9a01_mpy/src/micropython.cmake \
67 | FROZEN_MANIFEST=../../../../gc9a01_mpy/manifest.py \
68 | clean submodules all
69 |
70 | Erase the flash and deploy on your device
71 |
72 | .. code-block:: console
73 |
74 | $ make \
75 | BOARD=ESP32_GENERIC \
76 | BOARD_VARIANT=SPIRAM \
77 | USER_C_MODULES=../../../../gc9a01_mpy/src/micropython.cmake \
78 | FROZEN_MANIFEST=../../../../gc9a01_mpy/manifest.py \
79 | erase deploy
80 |
81 | RP2040 MicroPython 1.20 and later
82 | ---------------------------------
83 |
84 | Change to the RP2 port directory, and build the firmware
85 |
86 | .. code-block:: console
87 |
88 | $ cd micropython/ports/rp2
89 | $ make \
90 | BOARD=RPI_PICO \
91 | FROZEN_MANIFEST=../../../../gc9a01c/manifest.py \
92 | USER_C_MODULES=../../../gc9a01c/src/micropython.cmake \
93 | submodules clean all
94 |
95 | Flash the firmware.uf2 file from the build-${BOARD} directory to your device.
96 |
--------------------------------------------------------------------------------
/docs/_sources/configs.rst.txt:
--------------------------------------------------------------------------------
1 | .. _configs:
2 |
3 | .. toctree::
4 | :glob:
5 |
6 | configs/*
7 |
--------------------------------------------------------------------------------
/docs/_sources/configs/ESP32-S3-LCD-1.28_config.rst.txt:
--------------------------------------------------------------------------------
1 | .. _tft_configs/ESP32-S3-LCD-1.28:
2 |
3 | ESP32-S3-LCD-1.28
4 | =================
5 | https://www.waveshare.com/wiki/ESP32-S3-LCD-1.28
6 | Firmware: ESP32_GENERIC/firmware_16MiB.bin
7 |
8 | tft_configs/ESP32-S3-LCD-1.28/tft_config.py
9 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10 |
11 | .. literalinclude:: ../../tft_configs/ESP32-S3-LCD-1.28/tft_config.py
12 | :language: python
13 | :linenos:
14 | :lines: 1-
15 |
16 |
17 | tft_configs/ESP32-S3-LCD-1.28/tft_buttons.py
18 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
19 |
20 |
21 |
22 | .. literalinclude:: ../../tft_configs/ESP32-S3-LCD-1.28/tft_buttons.py
23 | :language: python
24 | :linenos:
25 | :lines: 1-
26 |
27 |
--------------------------------------------------------------------------------
/docs/_sources/configs/RP2-Dual-Display_config.rst.txt:
--------------------------------------------------------------------------------
1 | .. _tft_configs/RP2-Dual-Display:
2 |
3 | RP2-Dual-Display
4 | ================
5 |
6 | 240x240 GC9A01 display connected to a Raspberry Pi Pico.
7 |
8 | .. list-table:: **Connections**
9 | :header-rows: 1
10 |
11 | * - Pico Pin
12 | - Display
13 | * - 27 (GP21)
14 | - BL
15 | * - 26 (GP20)
16 | - RST
17 | * - 21 (GP16)
18 | - DC
19 | * - 22 (GP17)
20 | - CS
21 | * - 23 (GND)
22 | - GND
23 | * - 24 (GP18)
24 | - CLK
25 | * - 25 (GP19)
26 | - DIN
27 |
28 | tft_configs/RP2-Dual-Display/tft_config0.py
29 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
30 |
31 | .. literalinclude:: ../../tft_configs/RP2-Dual-Display/tft_config0.py
32 | :language: python
33 | :linenos:
34 | :lines: 1-
35 |
36 |
37 | 240x240 GC9A01 display connected to a Raspberry Pi Pico.
38 |
39 | .. list-table:: **Connections**
40 | :header-rows: 1
41 |
42 | * - Pico Pin
43 | - Display
44 | * - 14 (GP10)
45 | - BL
46 | * - 15 (GP11)
47 | - RST
48 | * - 16 (GP12)
49 | - DC
50 | * - 17 (GP13)
51 | - CS
52 | * - 18 (GND)
53 | - GND
54 | * - 19 (GP14)
55 | - CLK
56 | * - 20 (GP15)
57 | - DIN
58 |
59 | tft_configs/RP2-Dual-Display/tft_config1.py
60 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
61 |
62 | .. literalinclude:: ../../tft_configs/RP2-Dual-Display/tft_config1.py
63 | :language: python
64 | :linenos:
65 | :lines: 1-
66 |
67 |
68 | tft_configs/RP2-Dual-Display/tft_buttons.py
69 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
70 |
71 |
72 |
73 | .. literalinclude:: ../../tft_configs/RP2-Dual-Display/tft_buttons.py
74 | :language: python
75 | :linenos:
76 | :lines: 1-
77 |
78 |
--------------------------------------------------------------------------------
/docs/_sources/configs/RP2040-Touch-LCD-1.28_config.rst.txt:
--------------------------------------------------------------------------------
1 | .. _tft_configs/RP2040-Touch-LCD-1.28:
2 |
3 | RP2040-Touch-LCD-1.28
4 | =====================
5 |
6 |
7 | tft_configs/RP2040-Touch-LCD-1.28/tft_config.py
8 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9 |
10 | .. literalinclude:: ../../tft_configs/RP2040-Touch-LCD-1.28/tft_config.py
11 | :language: python
12 | :linenos:
13 | :lines: 1-
14 |
15 |
16 | tft_configs/RP2040-Touch-LCD-1.28/tft_buttons.py
17 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
18 |
19 |
20 |
21 | .. literalinclude:: ../../tft_configs/RP2040-Touch-LCD-1.28/tft_buttons.py
22 | :language: python
23 | :linenos:
24 | :lines: 1-
25 |
26 |
--------------------------------------------------------------------------------
/docs/_sources/configs/RP2_config.rst.txt:
--------------------------------------------------------------------------------
1 | .. _tft_configs/RP2:
2 |
3 | RP2
4 | ===
5 |
6 | Generic display connected to a Raspberry Pi Pico.
7 |
8 | .. list-table:: **Connections**
9 | :header-rows: 1
10 |
11 | * - Pico Pin
12 | - Display
13 | * - 14 (GP10)
14 | - BL
15 | * - 15 (GP11)
16 | - RST
17 | * - 16 (GP12)
18 | - DC
19 | * - 17 (GP13)
20 | - CS
21 | * - 18 (GND)
22 | - GND
23 | * - 19 (GP14)
24 | - CLK
25 | * - 20 (GP15)
26 | - DIN
27 |
28 | tft_configs/RP2/tft_config.py
29 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
30 |
31 | .. literalinclude:: ../../tft_configs/RP2/tft_config.py
32 | :language: python
33 | :linenos:
34 | :lines: 1-
35 |
36 |
37 | tft_configs/RP2/tft_buttons.py
38 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
39 |
40 |
41 |
42 | .. literalinclude:: ../../tft_configs/RP2/tft_buttons.py
43 | :language: python
44 | :linenos:
45 | :lines: 1-
46 |
47 |
--------------------------------------------------------------------------------
/docs/_sources/examples.rst.txt:
--------------------------------------------------------------------------------
1 | ****************
2 | Example Programs
3 | ****************
4 |
5 |
6 | Configuration modules
7 | =====================
8 |
9 | To run the examples, you need two modules that set up the display and buttons for the example MicroPython programs: **tft_config.py** and **tft_buttons.py**. These modules configure the display and manage button interactions, ensuring compatibility with various processors and displays. The provided modules located in the tft_configs folder are specific to the devices I used during testing; use them as a reference to create configuration modules for your device if it's not one of those included.
10 |
11 |
12 | .. include:: configs.rst
13 |
14 | Examples
15 | ========
16 |
17 | .. toctree::
18 | :maxdepth: 1
19 | :glob:
20 |
21 | examples/*
22 |
--------------------------------------------------------------------------------
/docs/_sources/examples/alien.rst.txt:
--------------------------------------------------------------------------------
1 | .. _alien:
2 |
3 | alien.py
4 | ========
5 |
6 | .. figure:: /_static/alien.png
7 | :align: center
8 |
9 | Randomly draw a jpg using the fast method on the display.
10 |
11 | The alien.jpg is from the Erik Flowers Weather Icons available from
12 | https://github.com/erikflowers/weather-icons and is licensed under
13 | SIL OFL 1.1
14 |
15 | It was was converted from the wi-alien.svg icon using
16 | ImageMagick's convert utility:
17 |
18 | convert wi-alien.svg -type TrueColor alien.jpg
19 |
20 | .. literalinclude:: ../../examples/jpg/alien.py
21 | :language: python
22 | :linenos:
23 | :lines: 1-
24 |
25 |
--------------------------------------------------------------------------------
/docs/_sources/examples/arcs.rst.txt:
--------------------------------------------------------------------------------
1 | .. _arcs:
2 |
3 | arcs.py
4 | =======
5 |
6 | .. figure:: /_static/arcs.png
7 | :align: center
8 |
9 | Arcs and Filled Arcs
10 |
11 | Draw Arcs and Filled Arcs on the display.
12 |
13 | .. literalinclude:: ../../examples/arcs.py
14 | :language: python
15 | :linenos:
16 | :lines: 1-
17 |
18 |
--------------------------------------------------------------------------------
/docs/_sources/examples/bitarray.rst.txt:
--------------------------------------------------------------------------------
1 | .. _bitarray:
2 |
3 | bitarray.py
4 | ===========
5 |
6 | .. figure:: /_static/bitarray.png
7 | :align: center
8 |
9 | An example using map_bitarray_to_rgb565 to draw sprites
10 |
11 | .. literalinclude:: ../../examples/bitarray.py
12 | :language: python
13 | :linenos:
14 | :lines: 1-
15 |
16 |
--------------------------------------------------------------------------------
/docs/_sources/examples/bluemarble.rst.txt:
--------------------------------------------------------------------------------
1 | .. _bluemarble:
2 |
3 | bluemarble.py
4 | =============
5 |
6 | .. figure:: /_static/bluemarble.png
7 | :align: center
8 |
9 | Draw a full screen bitmap on the display.
10 |
11 | Convert bluemarble.jpg to bitmap module
12 |
13 | .. code-block:: console
14 |
15 | utils/image_converter.py bluemarble.jpg 8 >bluemarble.py
16 |
17 | Since the bitmap is large use mpy-cross to precompile the bluemarble.py module to save memory.
18 |
19 | .. code-block:: console
20 |
21 | mpy-cross bluemarble.py
22 |
23 | Upload the compiled bitmap module `bluemarble.mpy` and example program `pbitmap.py`
24 |
25 | Bluemarble image courtesy of the NASA image and video gallery available at
26 | https://images.nasa.gov/
27 |
28 | .. literalinclude:: ../../examples/pbitmap/bluemarble.py
29 | :language: python
30 | :linenos:
31 | :lines: 1-
32 |
33 |
--------------------------------------------------------------------------------
/docs/_sources/examples/chango.rst.txt:
--------------------------------------------------------------------------------
1 | .. _chango:
2 |
3 | chango.py
4 | =========
5 |
6 | .. figure:: /_static/chango.png
7 | :align: center
8 |
9 | Test for font2bitmap converter.
10 |
11 | .. literalinclude:: ../../examples/prop_fonts/chango.py
12 | :language: python
13 | :linenos:
14 | :lines: 1-
15 |
16 |
--------------------------------------------------------------------------------
/docs/_sources/examples/feathers.rst.txt:
--------------------------------------------------------------------------------
1 | .. _feathers:
2 |
3 | feathers.py
4 | ===========
5 |
6 | .. figure:: /_static/feathers.png
7 | :align: center
8 |
9 | Smoothly scroll rainbow-colored mirrored random curves across the display.
10 |
11 | .. literalinclude:: ../../examples/feathers.py
12 | :language: python
13 | :linenos:
14 | :lines: 1-
15 |
16 |
--------------------------------------------------------------------------------
/docs/_sources/examples/fonts.rst.txt:
--------------------------------------------------------------------------------
1 | .. _fonts:
2 |
3 | fonts.py
4 | ========
5 |
6 | .. figure:: /_static/fonts.png
7 | :align: center
8 |
9 | Pages through all characters of four fonts on the Display.
10 |
11 | .. literalinclude:: ../../examples/fonts.py
12 | :language: python
13 | :linenos:
14 | :lines: 1-
15 |
16 |
--------------------------------------------------------------------------------
/docs/_sources/examples/hello.rst.txt:
--------------------------------------------------------------------------------
1 | .. _hello:
2 |
3 | hello.py
4 | ========
5 |
6 | .. figure:: /_static/hello.png
7 | :align: center
8 |
9 | Writes "Hello!" in random colors at random locations on the display.
10 |
11 | .. literalinclude:: ../../examples/hello.py
12 | :language: python
13 | :linenos:
14 | :lines: 1-
15 |
16 |
--------------------------------------------------------------------------------
/docs/_sources/examples/hello_world.rst.txt:
--------------------------------------------------------------------------------
1 | .. _hello_world:
2 |
3 | hello_world.py
4 | ==============
5 |
6 | .. figure:: /_static/hello_world.png
7 | :align: center
8 |
9 | Dual display Hello World example.
10 |
11 | Writes "Hello World" in random colors at random locations split across a pair of GC9A01 displays
12 | connected to a Raspberry Pi Pico.
13 |
14 | .. literalinclude:: ../../examples/hello_world.py
15 | :language: python
16 | :linenos:
17 | :lines: 1-
18 |
19 |
--------------------------------------------------------------------------------
/docs/_sources/examples/hershey.rst.txt:
--------------------------------------------------------------------------------
1 | .. _hershey:
2 |
3 | hershey.py
4 | ==========
5 | .. figure:: /_static/hershey.png
6 | :align: center
7 |
8 | Hershey vector font demo
9 |
10 | Demo program that draws greetings on display cycling thru hershey fonts and colors.
11 |
12 | .. literalinclude:: ../../examples/hershey.py
13 | :language: python
14 | :linenos:
15 | :lines: 1-
16 |
17 |
--------------------------------------------------------------------------------
/docs/_sources/examples/jpg_test.rst.txt:
--------------------------------------------------------------------------------
1 | .. _jpg_test:
2 |
3 | jpg_test.py
4 | ===========
5 |
6 | Draw a full screen jpg using the slower but less memory intensive method
7 | of blitting each Minimum Coded Unit (MCU) block. Usually 8x8 pixels but can
8 | be other multiples of 8.
9 |
10 | .. figure:: /_static/bluemarble.png
11 | :align: center
12 |
13 |
14 | bigbuckbunny.jpg (c) copyright 2008, Blender Foundation / www.bigbuckbunny.org
15 |
16 | .. literalinclude:: ../../examples/jpg/jpg_test.py
17 | :language: python
18 | :linenos:
19 | :lines: 1-
20 |
21 |
--------------------------------------------------------------------------------
/docs/_sources/examples/lines.rst.txt:
--------------------------------------------------------------------------------
1 | .. _lines:
2 |
3 | lines.py
4 | ========
5 | .. figure:: /_static/lines.png
6 | :align: center
7 |
8 | Benchmarks the speed of drawing horizontal and vertical lines on the display.
9 |
10 | .. literalinclude:: ../../examples/lines.py
11 | :language: python
12 | :linenos:
13 | :lines: 1-
14 |
15 |
--------------------------------------------------------------------------------
/docs/_sources/examples/mono_fonts.rst.txt:
--------------------------------------------------------------------------------
1 | .. _mono_fonts:
2 |
3 | mono_fonts.py
4 | =============
5 |
6 | .. figure:: /_static/mono_fonts.png
7 | :align: center
8 |
9 | Test for write_font_converter.py and bitmap method
10 |
11 | .. literalinclude:: ../../examples/mono_fonts/mono_fonts.py
12 | :language: python
13 | :linenos:
14 | :lines: 1-
15 |
16 |
--------------------------------------------------------------------------------
/docs/_sources/examples/noto_fonts.rst.txt:
--------------------------------------------------------------------------------
1 | .. _noto_fonts:
2 |
3 | noto_fonts.py
4 | =============
5 |
6 | .. figure:: /_static/noto_fonts.png
7 | :align: center
8 |
9 |
10 | Writes the names of three Noto fonts centered on the display using the font. The fonts were
11 | converted from True Type fonts using the write_font_converter.py utility.
12 |
13 | .. literalinclude:: ../../examples/noto_fonts/noto_fonts.py
14 | :language: python
15 | :linenos:
16 | :lines: 1-
17 |
18 |
--------------------------------------------------------------------------------
/docs/_sources/examples/pinball.rst.txt:
--------------------------------------------------------------------------------
1 | .. _pinball:
2 |
3 | pinball.py
4 | ==========
5 |
6 | .. figure:: /_static/pinball.png
7 | :align: center
8 |
9 | Minimal pinball game
10 |
11 | Minimal pinball game in MicroPython based on code from Ten Minute Physics Tutorial "How to write a
12 | pinball simulation."
13 |
14 | Tutorial Links:
15 | https://matthias-research.github.io/pages/tenMinutePhysics/
16 | https://youtu.be/NhVUCsXp-Uo
17 |
18 | Gameplay Video:
19 | https://youtu.be/y0B3i_UmEU8
20 |
21 | Requires:
22 | tft_config.py for display configuration. See examples/configs
23 | tft_buttons.py for button configuration. See examples/configs
24 | OR modify the code for your own display and buttons.
25 |
26 | This file incorporates work covered by the following copyright and permission notice.
27 | Modifications and additions Copyright (c) 2022 Russ Hughes and released under the same
28 | terms as the original code.
29 |
30 |
31 | Copyright 2021 Matthias Müller - Ten Minute Physics
32 |
33 | Permission is hereby granted, free of charge, to any person obtaining a copy of
34 | this software and associated documentation files (the "Software"), to deal in
35 | the Software without restriction, including without limitation the rights to
36 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
37 | of the Software, and to permit persons to whom the Software is furnished to do
38 | so, subject to the following conditions:
39 |
40 | The above copyright notice and this permission notice shall be included in all
41 | copies or substantial portions of the Software.
42 |
43 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
44 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
45 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
46 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
47 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
48 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
49 | SOFTWARE.
50 |
51 | .. literalinclude:: ../../examples/pinball.py
52 | :language: python
53 | :linenos:
54 | :lines: 1-
55 |
56 |
--------------------------------------------------------------------------------
/docs/_sources/examples/proverbs.rst.txt:
--------------------------------------------------------------------------------
1 | .. _proverbs:
2 |
3 | proverbs.py
4 | ===========
5 |
6 | .. figure:: /_static/proverbs.png
7 | :align: center
8 |
9 | Test for TrueType write_font_converter.
10 |
11 | Displays what I hope are chinese proverbs in simplified chinese to test UTF-8 font support.
12 | The fonts were converted from True Type fonts using the
13 | :ref:`write_font_converter.py` utility.
14 |
15 | .. literalinclude:: ../../examples/proverbs/make_proverbs_fonts.sh
16 |
17 |
18 | .. note:: This example requires the following modules:
19 |
20 | .. hlist::
21 | :columns: 3
22 |
23 | - `gc9a01`
24 | - `tft_config`
25 | - `proverbs_20`
26 |
27 | .. literalinclude:: ../../examples/proverbs/proverbs.py
28 | :language: python
29 | :linenos:
30 | :lines: 1-
31 |
32 |
--------------------------------------------------------------------------------
/docs/_sources/examples/roids.rst.txt:
--------------------------------------------------------------------------------
1 | .. _roids:
2 |
3 | roids.py
4 | ========
5 |
6 | .. figure:: /_static/roids.png
7 | :align: center
8 |
9 | Asteroids style game demo using polygons.
10 |
11 | .. literalinclude:: ../../examples/roids.py
12 | :language: python
13 | :linenos:
14 | :lines: 1-
15 |
16 |
--------------------------------------------------------------------------------
/docs/_sources/examples/rotations.rst.txt:
--------------------------------------------------------------------------------
1 | .. _rotations:
2 |
3 | rotations.py
4 | ============
5 |
6 | .. figure:: /_static/rotations.png
7 | :align: center
8 |
9 | Shows the effect of each of the 8 rotation values on the display.
10 |
11 | .. literalinclude:: ../../examples/rotations.py
12 | :language: python
13 | :linenos:
14 | :lines: 1-
15 |
16 |
--------------------------------------------------------------------------------
/docs/_sources/examples/scroll.rst.txt:
--------------------------------------------------------------------------------
1 | .. _scroll:
2 |
3 | scroll.py
4 | =========
5 |
6 | Smoothly scroll all characters of a font up the display.
7 | Fonts heights must be even multiples of the screen height
8 | (i.e. 8 or 16 pixels high).
9 |
10 | .. literalinclude:: ../../examples/scroll.py
11 | :language: python
12 | :linenos:
13 | :lines: 1-
14 |
15 |
--------------------------------------------------------------------------------
/docs/_sources/examples/tiny_toasters.rst.txt:
--------------------------------------------------------------------------------
1 | .. _tiny_toasters:
2 |
3 | tiny_toasters.py
4 | ================
5 |
6 | .. figure:: /_static/tiny_toasters.png
7 | :align: center
8 |
9 | Test sprites_converter.
10 |
11 | Tiny Flying Toasters for smaller displays using a converted BMP spritesheet module using:
12 |
13 | .. code-block:: console
14 |
15 | `sprites_converter.py ttoasters.bmp 32 32 4 > ttoast_bitmaps.py`
16 |
17 | .. rubric:: The tiny_toasters.py example uses the spritesheet from CircuitPython_Flying_Toasters pendant
18 | project https://learn.adafruit.com/circuitpython-sprite-animation-pendant-mario-clouds-flying-toasters
19 |
20 |
21 | .. note:: This example requires the following modules:
22 |
23 | .. hlist::
24 | :columns: 3
25 |
26 | - `gc9a01`
27 | - `tft_config`
28 | - `tiny_toasters`
29 |
30 | .. literalinclude:: ../../examples/tiny_toasters/tiny_toasters.py
31 | :language: python
32 | :linenos:
33 | :lines: 1-
34 |
35 |
--------------------------------------------------------------------------------
/docs/_sources/examples/toasters.rst.txt:
--------------------------------------------------------------------------------
1 | .. _toasters:
2 |
3 | toasters.py
4 | ===========
5 |
6 | .. figure:: /_static/toasters.png
7 | :align: center
8 |
9 | An example using bitmap to draw sprites on the display.
10 |
11 | Spritesheet from CircuitPython_Flying_Toasters
12 | https://learn.adafruit.com/circuitpython-sprite-animation-pendant-mario-clouds-flying-toasters
13 |
14 | .. literalinclude:: ../../examples/toasters/toasters.py
15 | :language: python
16 | :linenos:
17 | :lines: 1-
18 |
19 |
--------------------------------------------------------------------------------
/docs/_sources/examples/watch.rst.txt:
--------------------------------------------------------------------------------
1 | .. _watch:
2 |
3 | watch.py
4 | ========
5 |
6 | .. figure:: /_static/watch.png
7 | :align: center
8 |
9 | Analog Watch Display
10 |
11 | Analog Watch Display using jpg for the face and filled polygons for the hand Requires
12 | face_{width}x{height}.jpg in the same directory as this script. See the create_face.py
13 | script for creating a custom sized face image.
14 |
15 | Previous version video: https://youtu.be/NItKb6umMc4
16 |
17 | .. literalinclude:: ../../examples/watch/watch.py
18 | :language: python
19 | :linenos:
20 | :lines: 1-
21 |
22 |
--------------------------------------------------------------------------------
/docs/_sources/genindex.rst.txt:
--------------------------------------------------------------------------------
1 | Index
2 | #####
3 |
4 |
--------------------------------------------------------------------------------
/docs/_sources/index.rst.txt:
--------------------------------------------------------------------------------
1 | .. GC9A01C documentation
2 |
3 | GC9A01C MicroPython driver
4 | ==========================
5 |
6 | .. toctree::
7 | :maxdepth: 3
8 |
9 | self
10 | building
11 | gc9a01
12 | examples
13 | fonts
14 | utils
15 | genindex
16 |
--------------------------------------------------------------------------------
/docs/_sources/utils.rst.txt:
--------------------------------------------------------------------------------
1 | Utilities
2 | =========
3 |
4 | .. toctree::
5 | :glob:
6 |
7 | utils/*
8 |
--------------------------------------------------------------------------------
/docs/_sources/utils/create_png_examples.rst.txt:
--------------------------------------------------------------------------------
1 | .. _create_png_examples:
2 |
3 | create_png_examples.py
4 | ----------------------
5 | Reads all font-bin files from the specified `input` directory and writes png images to t
6 | he specified `output` directory. Optionally limiting the characters included to -first-char
7 | (-f) thru -last-char (-l). This is the program I used to create the png font samples in the
8 | documentation.
9 |
10 | .. seealso::
11 | - :ref:`Bitmap Font Samples`.
12 |
13 | Example
14 | ^^^^^^^
15 |
16 | .. code-block:: console
17 |
18 | - create_png_examples.py font_directory png_directory
19 |
20 | Usage
21 | ^^^^^
22 |
23 | .. code-block:: console
24 |
25 | usage: create_png_examples.py [-h] input output
26 |
27 | Creates png samples of each text font file from the input directoryto the output directory.
28 |
29 | positional arguments:
30 | input input directory containing font-bin files
31 | output output directory to create pngs
32 |
33 | optional arguments:
34 | -h, --help show this help message and exit
35 |
36 |
--------------------------------------------------------------------------------
/docs/_sources/utils/image_converter.rst.txt:
--------------------------------------------------------------------------------
1 | .. _image_converter:
2 |
3 | image_converter.py
4 | ------------------
5 | Convert an image file to a python module for use with the bitmap method. Use redirection to save the
6 | output to a file. The image is converted to a bitmap using the number of bits per pixel you specify.
7 | The bitmap is saved as a python module that can be imported and used with the bitmap method.
8 |
9 | .. seealso::
10 | - :ref:`alien.py`.
11 |
12 | Example
13 | ^^^^^^^
14 |
15 | .. code-block:: console
16 |
17 | # create python module from cat.png with 4 bits per pixel and save it to cat_bitmap.py.
18 | # Use '-s' to swap the color bytes for the GC9A01 display.
19 |
20 | ./image_converter cat.png 4 -s > cat_bitmap.py
21 |
22 | # cross compile the python module
23 | mpy-cross cat_bitmap.py
24 |
25 | # upload the compiled module to the board
26 | mpremote cp cat_bitmap.mpy :
27 |
28 | The python file can be imported and displayed with the bitmap method. For example:
29 |
30 | .. code-block:: python
31 |
32 | import tft_config
33 | import cat_bitmap
34 | tft = tft_config.config(1)
35 | tft.bitmap(cat_bitmap, 0, 0)
36 |
37 | Usage
38 | ^^^^^
39 |
40 | .. code-block:: console
41 |
42 | usage: image_converter.py [-h] [-s] image_file bits_per_pixel
43 |
44 | Convert image file to python module for use with bitmap method.
45 |
46 | positional arguments:
47 | image_file Name of file containing image to convert
48 | bits_per_pixel The number of bits to use per pixel (1..8)
49 |
50 | optional arguments:
51 | -h, --help show this help message and exit
52 | -s, --swap Swap color565 bytes
53 |
54 |
--------------------------------------------------------------------------------
/docs/_sources/utils/sprites_converter.rst.txt:
--------------------------------------------------------------------------------
1 | .. _sprites_converter:
2 |
3 | sprites_converter.py
4 | --------------------
5 | Convert a sprite sheet image to python a module for use with indexed bitmap method. The Sprite sheet
6 | width and height should be a multiple of sprite width and height. There should be no extra pixels
7 | between sprites. All sprites will share the same palette.
8 |
9 | .. seealso::
10 | - :ref:`tiny_toasters.py`.
11 |
12 | Example
13 | ^^^^^^^
14 |
15 | .. code-block:: console
16 |
17 | # create a sprite sheet with 7 colored sprites 32x32 pixels each
18 | ./make_colorbars_bitmap.py 227 32 3 --png sprites.png
19 |
20 | # convert the sprite sheet to a python module with 7 sprites
21 | ./sprites_converter.py sprites.png 32 32 4 > sprites.py
22 |
23 | .. code-block:: python
24 |
25 | import tft_config
26 | import sprites
27 | tft = tft_config.config(1)
28 | for i in range(sprites.BITMAPS):
29 | tft.bitmap(sprites, 0, 0, i)
30 |
31 | Usage
32 | ^^^^^
33 |
34 | .. code-block:: console
35 |
36 | usage: sprites_converter.py [-h] [-s] image_file sprite_width sprite_height bits_per_pixel
37 |
38 | Convert image file to python module for use with bitmap method.
39 |
40 | positional arguments:
41 | image_file Name of file containing image to convert
42 | sprite_width Width of sprites in pixels
43 | sprite_height Height of sprites in pixels
44 | bits_per_pixel The number of bits to use per pixel (1..8)
45 |
46 | optional arguments:
47 | -h, --help show this help message and exit
48 | -s, --swap Swap color565 bytes
49 |
50 |
--------------------------------------------------------------------------------
/docs/_sources/utils/text_font_converter.rst.txt:
--------------------------------------------------------------------------------
1 | .. _text_font_converter:
2 |
3 | text_font_converter.py
4 | ----------------------
5 | Convert fonts from the font-bin directory of spacerace's https://github.com/spacerace/romfont
6 | VGA and BIOS rom font repo. Optionally limiting the characters included to -first-char (-f) thru
7 | -last-char (-l).
8 |
9 | Input can be a file or a directory containing multiple font files. If input is a directory, output
10 | must also be a directory. If input is a file, output can be a file or a directory.
11 |
12 | .. seealso::
13 | - :ref:`fonts.py`.
14 | - :ref:`hello.py`.
15 | - :ref:`rotations.py`.
16 | - :ref:`scroll.py`.
17 | - :ref:`tiny_toasters.py`.
18 |
19 | Example
20 | ^^^^^^^
21 |
22 | .. code-block:: console
23 |
24 | # convert the IBM_VGA_8x8.bin font to a python module with 8x8 characters
25 | text_font_converter.py romfont/font-bin/IBM_VGA_8x8.bin vga_8x8.py -f 32 -l 127
26 |
27 | .. code-block:: python
28 |
29 | import tft_config
30 | import vga_8x8
31 | tft = tft_config.config(1)
32 | tft.bitmap(vga_8x8, "Hello World!", 0, 0)
33 |
34 | Usage
35 | ^^^^^
36 |
37 | .. code-block:: console
38 |
39 | usage: text_font_converter.py [-h] [-f FIRST_CHAR] [-l LAST_CHAR] input output
40 |
41 | Convert romfont.bin file or directory to python module(s).
42 |
43 | positional arguments:
44 | input file or directory containing binary font file(s).
45 | output file or directory to contain python font file(s).
46 |
47 | optional arguments:
48 | -h, --help show this help message and exit
49 | -f FIRST_CHAR, --first-char FIRST_CHAR
50 | The first character code to include in the conversion (default: 0x20).
51 | -l LAST_CHAR, --last-char LAST_CHAR
52 | The last character code to include in the conversion (default: 0x7F).
53 |
54 |
--------------------------------------------------------------------------------
/docs/_sources/utils/write_font_converter.rst.txt:
--------------------------------------------------------------------------------
1 | .. _write_font_converter:
2 |
3 | write_font_converter.py
4 | -----------------------
5 | Convert characters from a truetype font to a python bitmap for use with the bitmap or write method.
6 | The chango, noto_fonts and proverbs examples use converted TrueType fonts.
7 |
8 | .. seealso::
9 | - :ref:`chango.py`.
10 | - :ref:`noto_fonts.py`.
11 | - :ref:`proverbs.py`.
12 |
13 | Example
14 | ^^^^^^^
15 |
16 | .. code-block:: console
17 |
18 | # convert the Chango-Regular.ttf to a python bitmap module with approximately 32 pixel high characters
19 | ./write_font_converter.py Chango-Regular.ttf 32 -c 0x20-0x7f > chango_32.py
20 |
21 | .. code-block:: python
22 |
23 | import tft_config
24 | import chango_32
25 | tft = tft_config.config(1)
26 | tft.write(chango_32, "Hello World!", 0, 0)
27 |
28 | Usage
29 | ^^^^^
30 |
31 | .. code-block:: console
32 |
33 | usage: write_font_converter.py [-h] [-width FONT_WIDTH] (-c CHARACTERS | -s STRING) font_file font_height
34 |
35 | Convert characters from a truetype font to a python bitmap for use with the bitmap method in the st7789 and ili9342 drivers.
36 |
37 | positional arguments:
38 | font_file name of font file to convert.
39 | font_height size of font to create bitmaps from.
40 |
41 | optional arguments:
42 | -h, --help show this help message and exit
43 | -width FONT_WIDTH, --font_width FONT_WIDTH
44 | width of font to create bitmaps from.
45 |
46 | character selection:
47 | characters from the font to include in the bitmap.
48 |
49 | -c CHARACTERS, --characters CHARACTERS
50 | integer or hex character values and/or ranges to include. For example: "65, 66, 67" or "32-127" or "0x30-0x39,
51 | 0x41-0x5a"
52 | -s STRING, --string STRING
53 | string of characters to include For example: "1234567890-."
54 |
55 |
--------------------------------------------------------------------------------
/docs/_static/GC9A01.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_static/GC9A01.jpg
--------------------------------------------------------------------------------
/docs/_static/alien.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_static/alien.bmp
--------------------------------------------------------------------------------
/docs/_static/alien.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_static/alien.png
--------------------------------------------------------------------------------
/docs/_static/arcs.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_static/arcs.bmp
--------------------------------------------------------------------------------
/docs/_static/arcs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_static/arcs.png
--------------------------------------------------------------------------------
/docs/_static/bitarray.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_static/bitarray.bmp
--------------------------------------------------------------------------------
/docs/_static/bitarray.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_static/bitarray.png
--------------------------------------------------------------------------------
/docs/_static/bluemarble.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_static/bluemarble.bmp
--------------------------------------------------------------------------------
/docs/_static/bluemarble.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_static/bluemarble.png
--------------------------------------------------------------------------------
/docs/_static/chango.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_static/chango.bmp
--------------------------------------------------------------------------------
/docs/_static/chango.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_static/chango.png
--------------------------------------------------------------------------------
/docs/_static/css/badge_only.css:
--------------------------------------------------------------------------------
1 | .clearfix{*zoom:1}.clearfix:after,.clearfix:before{display:table;content:""}.clearfix:after{clear:both}@font-face{font-family:FontAwesome;font-style:normal;font-weight:400;src:url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713?#iefix) format("embedded-opentype"),url(fonts/fontawesome-webfont.woff2?af7ae505a9eed503f8b8e6982036873e) format("woff2"),url(fonts/fontawesome-webfont.woff?fee66e712a8a08eef5805a46892932ad) format("woff"),url(fonts/fontawesome-webfont.ttf?b06871f281fee6b241d60582ae9369b9) format("truetype"),url(fonts/fontawesome-webfont.svg?912ec66d7572ff821749319396470bde#FontAwesome) format("svg")}.fa:before{font-family:FontAwesome;font-style:normal;font-weight:400;line-height:1}.fa:before,a .fa{text-decoration:inherit}.fa:before,a .fa,li .fa{display:inline-block}li .fa-large:before{width:1.875em}ul.fas{list-style-type:none;margin-left:2em;text-indent:-.8em}ul.fas li .fa{width:.8em}ul.fas li .fa-large:before{vertical-align:baseline}.fa-book:before,.icon-book:before{content:"\f02d"}.fa-caret-down:before,.icon-caret-down:before{content:"\f0d7"}.fa-caret-up:before,.icon-caret-up:before{content:"\f0d8"}.fa-caret-left:before,.icon-caret-left:before{content:"\f0d9"}.fa-caret-right:before,.icon-caret-right:before{content:"\f0da"}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;z-index:400}.rst-versions a{color:#2980b9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27ae60}.rst-versions .rst-current-version:after{clear:both;content:"";display:block}.rst-versions .rst-current-version .fa{color:#fcfcfc}.rst-versions .rst-current-version .fa-book,.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#e74c3c;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#f1c40f;color:#000}.rst-versions.shift-up{height:auto;max-height:100%;overflow-y:scroll}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:grey;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:1px solid #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px;max-height:90%}.rst-versions.rst-badge .fa-book,.rst-versions.rst-badge .icon-book{float:none;line-height:30px}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book,.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge>.rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width:768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}}
--------------------------------------------------------------------------------
/docs/_static/css/fonts/Roboto-Slab-Bold.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_static/css/fonts/Roboto-Slab-Bold.woff
--------------------------------------------------------------------------------
/docs/_static/css/fonts/Roboto-Slab-Bold.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_static/css/fonts/Roboto-Slab-Bold.woff2
--------------------------------------------------------------------------------
/docs/_static/css/fonts/Roboto-Slab-Regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_static/css/fonts/Roboto-Slab-Regular.woff
--------------------------------------------------------------------------------
/docs/_static/css/fonts/Roboto-Slab-Regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_static/css/fonts/Roboto-Slab-Regular.woff2
--------------------------------------------------------------------------------
/docs/_static/css/fonts/fontawesome-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_static/css/fonts/fontawesome-webfont.eot
--------------------------------------------------------------------------------
/docs/_static/css/fonts/fontawesome-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_static/css/fonts/fontawesome-webfont.ttf
--------------------------------------------------------------------------------
/docs/_static/css/fonts/fontawesome-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_static/css/fonts/fontawesome-webfont.woff
--------------------------------------------------------------------------------
/docs/_static/css/fonts/fontawesome-webfont.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_static/css/fonts/fontawesome-webfont.woff2
--------------------------------------------------------------------------------
/docs/_static/css/fonts/lato-bold-italic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_static/css/fonts/lato-bold-italic.woff
--------------------------------------------------------------------------------
/docs/_static/css/fonts/lato-bold-italic.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_static/css/fonts/lato-bold-italic.woff2
--------------------------------------------------------------------------------
/docs/_static/css/fonts/lato-bold.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_static/css/fonts/lato-bold.woff
--------------------------------------------------------------------------------
/docs/_static/css/fonts/lato-bold.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_static/css/fonts/lato-bold.woff2
--------------------------------------------------------------------------------
/docs/_static/css/fonts/lato-normal-italic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_static/css/fonts/lato-normal-italic.woff
--------------------------------------------------------------------------------
/docs/_static/css/fonts/lato-normal-italic.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_static/css/fonts/lato-normal-italic.woff2
--------------------------------------------------------------------------------
/docs/_static/css/fonts/lato-normal.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_static/css/fonts/lato-normal.woff
--------------------------------------------------------------------------------
/docs/_static/css/fonts/lato-normal.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_static/css/fonts/lato-normal.woff2
--------------------------------------------------------------------------------
/docs/_static/documentation_options.js:
--------------------------------------------------------------------------------
1 | const DOCUMENTATION_OPTIONS = {
2 | VERSION: '0.1.0',
3 | LANGUAGE: 'en',
4 | COLLAPSE_INDEX: false,
5 | BUILDER: 'html',
6 | FILE_SUFFIX: '.html',
7 | LINK_SUFFIX: '.html',
8 | HAS_SOURCE: true,
9 | SOURCELINK_SUFFIX: '.txt',
10 | NAVIGATION_WITH_KEYS: false,
11 | SHOW_SEARCH_SUMMARY: true,
12 | ENABLE_SEARCH_SHORTCUTS: true,
13 | };
--------------------------------------------------------------------------------
/docs/_static/feathers.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_static/feathers.png
--------------------------------------------------------------------------------
/docs/_static/file.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_static/file.png
--------------------------------------------------------------------------------
/docs/_static/fonts.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_static/fonts.bmp
--------------------------------------------------------------------------------
/docs/_static/fonts.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_static/fonts.png
--------------------------------------------------------------------------------
/docs/_static/hello.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_static/hello.png
--------------------------------------------------------------------------------
/docs/_static/hello_world.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_static/hello_world.jpeg
--------------------------------------------------------------------------------
/docs/_static/hello_world.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_static/hello_world.png
--------------------------------------------------------------------------------
/docs/_static/hershey.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_static/hershey.png
--------------------------------------------------------------------------------
/docs/_static/jpg_test.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_static/jpg_test.bmp
--------------------------------------------------------------------------------
/docs/_static/jpg_test.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_static/jpg_test.png
--------------------------------------------------------------------------------
/docs/_static/js/badge_only.js:
--------------------------------------------------------------------------------
1 | !function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=4)}({4:function(e,t,r){}});
--------------------------------------------------------------------------------
/docs/_static/js/html5shiv.min.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @preserve HTML5 Shiv 3.7.3 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
3 | */
4 | !function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=t.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=t.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),t.elements=c+" "+a,j(b)}function f(a){var b=s[a[q]];return b||(b={},r++,a[q]=r,s[r]=b),b}function g(a,c,d){if(c||(c=b),l)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():p.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||o.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),l)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return t.shivMethods?g(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(t,b.frag)}function j(a){a||(a=b);var d=f(a);return!t.shivCSS||k||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),l||i(a,d),a}var k,l,m="3.7.3-pre",n=a.html5||{},o=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,p=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,q="_html5shiv",r=0,s={};!function(){try{var a=b.createElement("a");a.innerHTML="",k="hidden"in a,l=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){k=!0,l=!0}}();var t={elements:n.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:m,shivCSS:n.shivCSS!==!1,supportsUnknownElements:l,shivMethods:n.shivMethods!==!1,type:"default",shivDocument:j,createElement:g,createDocumentFragment:h,addElements:e};a.html5=t,j(b),"object"==typeof module&&module.exports&&(module.exports=t)}("undefined"!=typeof window?window:this,document);
--------------------------------------------------------------------------------
/docs/_static/lines.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_static/lines.bmp
--------------------------------------------------------------------------------
/docs/_static/lines.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_static/lines.png
--------------------------------------------------------------------------------
/docs/_static/minus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_static/minus.png
--------------------------------------------------------------------------------
/docs/_static/mono_fonts.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_static/mono_fonts.bmp
--------------------------------------------------------------------------------
/docs/_static/mono_fonts.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_static/mono_fonts.png
--------------------------------------------------------------------------------
/docs/_static/noto_fonts.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_static/noto_fonts.bmp
--------------------------------------------------------------------------------
/docs/_static/noto_fonts.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_static/noto_fonts.png
--------------------------------------------------------------------------------
/docs/_static/pinball.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_static/pinball.png
--------------------------------------------------------------------------------
/docs/_static/plus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_static/plus.png
--------------------------------------------------------------------------------
/docs/_static/proverbs.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_static/proverbs.bmp
--------------------------------------------------------------------------------
/docs/_static/proverbs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_static/proverbs.png
--------------------------------------------------------------------------------
/docs/_static/roids.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_static/roids.png
--------------------------------------------------------------------------------
/docs/_static/rotations.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_static/rotations.png
--------------------------------------------------------------------------------
/docs/_static/scroll.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_static/scroll.png
--------------------------------------------------------------------------------
/docs/_static/test.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_static/test.png
--------------------------------------------------------------------------------
/docs/_static/tiny_toasters.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_static/tiny_toasters.bmp
--------------------------------------------------------------------------------
/docs/_static/tiny_toasters.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_static/tiny_toasters.png
--------------------------------------------------------------------------------
/docs/_static/toasters.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_static/toasters.bmp
--------------------------------------------------------------------------------
/docs/_static/toasters.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_static/toasters.png
--------------------------------------------------------------------------------
/docs/_static/vga1_16x16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_static/vga1_16x16.png
--------------------------------------------------------------------------------
/docs/_static/vga1_16x32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_static/vga1_16x32.png
--------------------------------------------------------------------------------
/docs/_static/vga1_8x16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_static/vga1_8x16.png
--------------------------------------------------------------------------------
/docs/_static/vga1_8x8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_static/vga1_8x8.png
--------------------------------------------------------------------------------
/docs/_static/vga1_bold_16x16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_static/vga1_bold_16x16.png
--------------------------------------------------------------------------------
/docs/_static/vga1_bold_16x32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_static/vga1_bold_16x32.png
--------------------------------------------------------------------------------
/docs/_static/vga2_16x16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_static/vga2_16x16.png
--------------------------------------------------------------------------------
/docs/_static/vga2_16x32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_static/vga2_16x32.png
--------------------------------------------------------------------------------
/docs/_static/vga2_8x16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_static/vga2_8x16.png
--------------------------------------------------------------------------------
/docs/_static/vga2_8x8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_static/vga2_8x8.png
--------------------------------------------------------------------------------
/docs/_static/vga2_bold_16x16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_static/vga2_bold_16x16.png
--------------------------------------------------------------------------------
/docs/_static/vga2_bold_16x32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_static/vga2_bold_16x32.png
--------------------------------------------------------------------------------
/docs/_static/watch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/_static/watch.png
--------------------------------------------------------------------------------
/docs/objects.inv:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/docs/objects.inv
--------------------------------------------------------------------------------
/examples/arcs.py:
--------------------------------------------------------------------------------
1 | """
2 | arcs.py
3 | =======
4 |
5 | .. figure:: /_static/arcs.png
6 | :align: center
7 |
8 | Arcs and Filled Arcs
9 |
10 | Draw Arcs and Filled Arcs on the display.
11 | """
12 |
13 | import gc9a01
14 | import tft_config
15 |
16 |
17 | def color_wheel(step=1):
18 | """Generator that yields a 565 color from the color wheel"""
19 | position = 0
20 | while True:
21 | # Adjust the position within the range [0, 255)
22 | adjusted_position = (255 - position) % 255
23 |
24 | # Calculate the RGB values based on the adjusted position
25 | if adjusted_position < 85:
26 | r, g, b = 255 - adjusted_position * 3, 0, adjusted_position * 3
27 | elif adjusted_position < 170:
28 | adjusted_position -= 85
29 | r, g, b = 0, adjusted_position * 3, 255 - adjusted_position * 3
30 | else:
31 | adjusted_position -= 170
32 | r, g, b = adjusted_position * 3, 255 - adjusted_position * 3, 0
33 |
34 | # Yield the next color in the wheel
35 | yield gc9a01.color565(r, g, b)
36 |
37 | # Move to the next position in the wheel
38 | position = (position + step) % 255
39 |
40 |
41 | def main():
42 | """
43 | This function initializes the display and draws a series of colored arcs in a continuous loop.
44 | """
45 |
46 | # Initialize the TFT display and fill it with black color
47 | tft = tft_config.config(tft_config.WIDE)
48 | tft.init()
49 | tft.fill(0)
50 |
51 | # Get the width and height of the display
52 | width, height = tft.width(), tft.height()
53 |
54 | # Calculate the center of the display
55 | center_x, center_y = width // 2, height // 2
56 |
57 | # The radii of the arcs are equal to the half of the display's dimensions
58 | radius_x, radius_y = center_x, center_y
59 |
60 | # The step size for the angle of the arcs
61 | step = 5
62 |
63 | # Create a color wheel generator
64 | wheel = color_wheel()
65 |
66 | # Enter an infinite loop
67 | while True:
68 | # The start angle for the arcs
69 | start_angle = 0
70 |
71 | # Draw a series of arcs with increasing start and end angles
72 | for end_angle in range(0, 361, step):
73 | # Draw a filled arc with a color from the color wheel
74 | tft.fill_arc(
75 | center_x,
76 | center_y,
77 | start_angle,
78 | end_angle,
79 | 5,
80 | radius_x,
81 | radius_y,
82 | next(wheel),
83 | )
84 |
85 | # Draw a series of white arcs with with increasing radii
86 | for fraction in range(20, 100, 33):
87 | # Calculate the radius based on the fraction of the display's height
88 | radius = int(fraction * center_y / 100 + 0.5)
89 |
90 | # Draw a white arc
91 | tft.arc(
92 | center_x,
93 | center_y,
94 | start_angle,
95 | end_angle,
96 | step,
97 | radius,
98 | radius,
99 | 1,
100 | gc9a01.WHITE,
101 | )
102 |
103 | # The start angle for the next arc is the end angle of the current arc
104 | start_angle = end_angle
105 |
106 |
107 | # Call the main function
108 | main()
109 |
--------------------------------------------------------------------------------
/examples/circle.py:
--------------------------------------------------------------------------------
1 | """
2 | circle.py
3 | ========
4 | .. figure:: /_static/circle.png
5 | :align: center
6 |
7 | Draws circle to determine visable pixels on a round display.
8 | """
9 |
10 | import random
11 | import time
12 | import gc9a01
13 | import tft_config
14 |
15 | tft = tft_config.config(tft_config.TALL)
16 | WIDTH = tft.width()
17 | HEIGHT = tft.height()
18 |
19 | def main():
20 | tft.init()
21 | tft.fill(0)
22 | tft.circle(119, 119, 119, gc9a01.color565(255, 255, 255))
23 |
24 | main()
25 |
--------------------------------------------------------------------------------
/examples/feathers.py:
--------------------------------------------------------------------------------
1 | """
2 | feathers.py
3 | ===========
4 |
5 | .. figure:: /_static/feathers.png
6 | :align: center
7 |
8 | Smoothly scroll rainbow-colored mirrored random curves across the display.
9 | """
10 |
11 | import random
12 | import math
13 | import utime
14 | import gc9a01
15 | import tft_config
16 |
17 | def between(left, right, along):
18 | """returns a point along the curve from left to right"""
19 | dist = (1 - math.cos(along * math.pi)) / 2
20 | return left * (1 - dist) + right * dist
21 |
22 |
23 | def color_wheel(position):
24 | """returns a 565 color from the given position of the color wheel"""
25 | position = (255 - position) % 255
26 |
27 | if position < 85:
28 | return gc9a01.color565(255 - position * 3, 0, position * 3)
29 |
30 | if position < 170:
31 | position -= 85
32 | return gc9a01.color565(0, position * 3, 255 - position * 3)
33 |
34 | position -= 170
35 | return gc9a01.color565(position * 3, 255 - position * 3, 0)
36 |
37 |
38 | def main():
39 | '''
40 | The big show!
41 | '''
42 |
43 | tft = tft_config.config(1) # configure driver to rotate screen 90 degrees
44 | tft.init() # initialize display
45 |
46 | height = tft.height() # height of display in pixels
47 | width = tft.width() # width if display in pixels
48 |
49 | tfa = tft_config.TFA # top free area when scrolling
50 | bfa = tft_config.BFA # bottom free area when scrolling
51 |
52 | scroll = 0 # scroll position
53 | wheel = 0 # color wheel position
54 |
55 | tft.vscrdef(tfa, width, bfa) # set scroll area
56 | tft.vscsad(scroll + tfa) # set scroll position
57 | tft.fill(gc9a01.BLACK) # clear screen
58 |
59 | half = (height >> 1) - 1 # half the height of the display
60 | interval = 0 # steps between new points
61 | increment = 0 # increment per step
62 | counter = 1 # step counter, overflow to start
63 | current_y = 0 # current_y value (right point)
64 | last_y = 0 # last_y value (left point)
65 |
66 | # segment offsets
67 | x_offsets = [x * (width // 8) -1 for x in range(2,9)]
68 |
69 | while True:
70 | # when the counter exceeds the interval, save current_y to last_y,
71 | # choose a new random value for current_y between 0 and 1/2 the
72 | # height of the display, choose a new random interval then reset
73 | # the counter to 0
74 |
75 | if counter > interval:
76 | last_y = current_y
77 | current_y = random.randint(0, half)
78 | counter = 0
79 | interval = random.randint(10, 100)
80 | increment = 1 / interval
81 |
82 | # clear the first column of the display and scroll it
83 | tft.vline(scroll, 0, height, gc9a01.BLACK)
84 | tft.vscsad(scroll + tfa)
85 |
86 | # get the next point between last_y and current_y
87 | tween = int(between(last_y, current_y, counter * increment))
88 |
89 | # draw mirrored pixels across the display at the offsets using the color_wheel effect
90 | for i, x_offset in enumerate(x_offsets):
91 | tft.pixel((scroll + x_offset) % width, half + tween, color_wheel(wheel+(i<<2)))
92 | tft.pixel((scroll + x_offset) % width, half - tween, color_wheel(wheel+(i<<2)))
93 |
94 | # increment scroll, counter, and wheel
95 | scroll = (scroll + 1) % width
96 | wheel = (wheel + 1) % 256
97 | counter += 1
98 |
99 | # pause to slow down scrolling
100 | utime.sleep(0.005)
101 |
102 |
103 | main()
104 |
--------------------------------------------------------------------------------
/examples/fonts.py:
--------------------------------------------------------------------------------
1 | """
2 | fonts.py
3 | ========
4 |
5 | .. figure:: /_static/fonts.png
6 | :align: center
7 |
8 | Pages through all characters of four fonts on the Display.
9 | """
10 |
11 | import utime
12 | from machine import Pin, SPI
13 | import gc9a01
14 | import tft_config
15 |
16 | import vga1_8x8 as font1
17 | import vga1_8x16 as font2
18 | import vga1_bold_16x16 as font3
19 | import vga1_bold_16x32 as font4
20 |
21 |
22 | def main():
23 | tft = tft_config.config(tft_config.TALL)
24 |
25 | tft.init()
26 | tft.fill(gc9a01.BLACK)
27 | utime.sleep(1)
28 |
29 | while True:
30 | for font in (font1, font2, font3, font4):
31 | tft.fill(gc9a01.BLUE)
32 | line = 0
33 | col = 0
34 | for char in range(font.FIRST, font.LAST):
35 |
36 | tft.text(font, chr(char), col, line, gc9a01.WHITE, gc9a01.BLUE)
37 |
38 | col += font.WIDTH
39 | if col > tft.width() - font.WIDTH:
40 | col = 0
41 | line += font.HEIGHT
42 |
43 | if line > tft.height() - font.HEIGHT:
44 | utime.sleep(3)
45 | tft.fill(gc9a01.BLUE)
46 | line = 0
47 | col = 0
48 |
49 | utime.sleep(3)
50 |
51 |
52 | main()
53 |
--------------------------------------------------------------------------------
/examples/hello.py:
--------------------------------------------------------------------------------
1 | """
2 | hello.py
3 | ========
4 |
5 | .. figure:: /_static/hello.png
6 | :align: center
7 |
8 | Writes "Hello!" in random colors at random locations on the display.
9 | """
10 |
11 | import random
12 |
13 | import vga1_bold_16x32 as font
14 | import gc9a01
15 | import tft_config
16 |
17 | tft = tft_config.config(tft_config.TALL)
18 |
19 |
20 | def main():
21 |
22 | tft.init()
23 |
24 | while True:
25 | for rotation in range(4):
26 | tft.rotation(rotation)
27 | tft.fill(0)
28 | col_max = tft.width() - font.WIDTH * 6
29 | row_max = tft.height() - font.HEIGHT
30 |
31 | for _ in range(128):
32 | tft.text(
33 | font,
34 | "Hello!",
35 | random.randint(0, col_max),
36 | random.randint(0, row_max),
37 | gc9a01.color565(
38 | random.getrandbits(8),
39 | random.getrandbits(8),
40 | random.getrandbits(8),
41 | ),
42 | gc9a01.color565(
43 | random.getrandbits(8),
44 | random.getrandbits(8),
45 | random.getrandbits(8),
46 | ),
47 | )
48 |
49 |
50 | main()
51 |
--------------------------------------------------------------------------------
/examples/hello_world.py:
--------------------------------------------------------------------------------
1 | """
2 | hello_world.py
3 | ==============
4 |
5 | .. figure:: /_static/hello_world.png
6 | :align: center
7 |
8 | Dual display Hello World example.
9 |
10 | Writes "Hello World" in random colors at random locations split across a pair of GC9A01 displays
11 | connected to a Raspberry Pi Pico.
12 |
13 | """
14 |
15 | from machine import Pin, SPI
16 | import random
17 | import gc9a01
18 | import tft_config0
19 | import tft_config1
20 |
21 | import vga1_bold_16x32 as font
22 |
23 |
24 | def main():
25 | """
26 | Initializes tft0 and tft1 displays and displays "Hello" and
27 | "World" at random locations on both displays.
28 | """
29 | tft0 = tft_config0.config(tft_config0.TALL)
30 | tft1 = tft_config1.config(tft_config1.TALL)
31 |
32 | tft0.init()
33 | tft1.init()
34 |
35 | while True:
36 | for rotation in range(4):
37 | tft0.rotation(rotation)
38 | tft0.fill(0)
39 |
40 | tft1.rotation(rotation)
41 | tft1.fill(0)
42 |
43 | col_max = tft0.width() - font.WIDTH * 5
44 | row_max = tft0.height() - font.HEIGHT
45 |
46 | for _ in range(128):
47 | col = random.randint(0, col_max)
48 | row = random.randint(0, row_max)
49 |
50 | fg = gc9a01.color565(
51 | random.getrandbits(8), random.getrandbits(8), random.getrandbits(8)
52 | )
53 |
54 | bg = gc9a01.color565(
55 | random.getrandbits(8), random.getrandbits(8), random.getrandbits(8)
56 | )
57 |
58 | tft0.text(font, "Hello", col, row, fg, bg)
59 | tft1.text(font, "World", col, row, fg, bg)
60 |
61 |
62 | main()
63 |
--------------------------------------------------------------------------------
/examples/jpg/alien.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/examples/jpg/alien.jpg
--------------------------------------------------------------------------------
/examples/jpg/alien.py:
--------------------------------------------------------------------------------
1 | """
2 | alien.py
3 | ========
4 |
5 | .. figure:: /_static/alien.png
6 | :align: center
7 |
8 | Randomly draw a jpg using the fast method on the display.
9 |
10 | The alien.jpg is from the Erik Flowers Weather Icons available from
11 | https://github.com/erikflowers/weather-icons and is licensed under
12 | SIL OFL 1.1
13 |
14 | It was was converted from the wi-alien.svg icon using
15 | ImageMagick's convert utility:
16 |
17 | convert wi-alien.svg -type TrueColor alien.jpg
18 | """
19 |
20 | import gc
21 | import random
22 | import gc9a01
23 | import tft_config
24 |
25 |
26 | def main():
27 | """
28 | Decode and draw jpg on display
29 | """
30 | gc.enable()
31 | gc.collect()
32 |
33 | tft = tft_config.config(tft_config.TALL)
34 |
35 | # enable display and clear screen
36 | tft.init()
37 |
38 | # cache width and height
39 | width = tft.width()
40 | height = tft.height()
41 |
42 | # display jpg in random locations
43 | while True:
44 | tft.rotation(random.randint(0, 4))
45 | tft.jpg(
46 | "alien.jpg",
47 | random.randint(0, width - 30),
48 | random.randint(0, height - 30),
49 | gc9a01.FAST,
50 | )
51 |
52 |
53 | main()
54 |
--------------------------------------------------------------------------------
/examples/jpg/bigbuckbunny.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/examples/jpg/bigbuckbunny.jpg
--------------------------------------------------------------------------------
/examples/jpg/bluemarble.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/examples/jpg/bluemarble.jpg
--------------------------------------------------------------------------------
/examples/jpg/jpg_test.py:
--------------------------------------------------------------------------------
1 | """
2 | jpg_test.py
3 | ===========
4 |
5 | Draw a full screen jpg using the slower but less memory intensive method
6 | of blitting each Minimum Coded Unit (MCU) block. Usually 8x8 pixels but can
7 | be other multiples of 8.
8 |
9 | .. figure:: /_static/bluemarble.png
10 | :align: center
11 |
12 |
13 | bigbuckbunny.jpg (c) copyright 2008, Blender Foundation / www.bigbuckbunny.org
14 | """
15 |
16 | import gc
17 | import time
18 | import gc9a01
19 | import tft_config
20 |
21 |
22 | def main():
23 | """
24 | Decode and draw jpg on display
25 | """
26 | gc.enable()
27 | gc.collect()
28 |
29 | tft = tft_config.config(tft_config.TALL)
30 |
31 | # enable display and clear screen
32 | tft.init()
33 |
34 | # cache width and height
35 | width = tft.width()
36 | height = tft.height()
37 |
38 | # cycle thru jpg's
39 | while True:
40 | for image in ["bigbuckbunny.jpg", "bluemarble.jpg"]:
41 | tft.jpg(image, 0, 0, gc9a01.SLOW)
42 | time.sleep(5)
43 |
44 |
45 | main()
46 |
--------------------------------------------------------------------------------
/examples/jpg/wi-alien.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
17 |
--------------------------------------------------------------------------------
/examples/lines.py:
--------------------------------------------------------------------------------
1 | """
2 | lines.py
3 | ========
4 | .. figure:: /_static/lines.png
5 | :align: center
6 |
7 | Benchmarks the speed of drawing horizontal and vertical lines on the display.
8 | """
9 |
10 | import random
11 | import time
12 | import gc9a01
13 | import tft_config
14 |
15 | tft = tft_config.config(tft_config.TALL)
16 | WIDTH = tft.width()
17 | HEIGHT = tft.height()
18 |
19 |
20 | def time_function(func, *args):
21 | """time a function"""
22 | start = time.ticks_ms()
23 | func(*args)
24 | return time.ticks_ms() - start
25 |
26 |
27 | def horizontal(line_count):
28 | """draw line_count horizontal lines on random y positions"""
29 | for _ in range(line_count):
30 | y = random.randint(0, HEIGHT)
31 | tft.line(
32 | 0,
33 | y,
34 | WIDTH,
35 | y,
36 | gc9a01.color565(
37 | random.randint(0, 255), random.randint(0, 255), random.randint(0, 255)
38 | ),
39 | )
40 |
41 |
42 | def vertical(line_count):
43 | """draw line_count vertical lines on random x positions"""
44 | for _ in range(line_count):
45 | x = random.randint(0, WIDTH)
46 | tft.line(
47 | x,
48 | 0,
49 | x,
50 | HEIGHT,
51 | gc9a01.color565(
52 | random.randint(0, 255), random.randint(0, 255), random.randint(0, 255)
53 | ),
54 | )
55 |
56 |
57 | def diagonal(line_count):
58 | """draw line_count diagnal lines on random y positions"""
59 | x = 0
60 | for _ in range(line_count):
61 | x += 1
62 | x %= WIDTH
63 | tft.line(
64 | x,
65 | 0,
66 | WIDTH - x,
67 | HEIGHT,
68 | gc9a01.color565(
69 | random.randint(0, 255), random.randint(0, 255), random.randint(0, 255)
70 | ),
71 | )
72 |
73 |
74 | def main():
75 | tft.init()
76 | tft.fill(0)
77 | print("")
78 | print("horizonal: ", time_function(horizontal, 1000))
79 | print("vertical: ", time_function(vertical, 1000))
80 | print("diagonal: ", time_function(diagonal, 1000))
81 |
82 |
83 | main()
84 |
--------------------------------------------------------------------------------
/examples/mask.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/examples/mask.png
--------------------------------------------------------------------------------
/examples/mono_fonts/inconsolata-700.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/examples/mono_fonts/inconsolata-700.ttf
--------------------------------------------------------------------------------
/examples/mono_fonts/mono_fonts.py:
--------------------------------------------------------------------------------
1 | """
2 | mono_fonts.py
3 | =============
4 |
5 | .. figure:: /_static/mono_fonts.png
6 | :align: center
7 |
8 | Test for write_font_converter.py and bitmap method
9 |
10 | """
11 |
12 | import time
13 | import gc9a01
14 | import tft_config
15 |
16 | import inconsolata_16 as font_16
17 | import inconsolata_32 as font_32
18 | import inconsolata_64 as font_64
19 |
20 |
21 | def main():
22 | fast = False
23 |
24 | def display_font(font):
25 | tft.fill(gc9a01.BLUE)
26 | column = 0
27 | row = 0
28 | for char in font.MAP:
29 | tft.bitmap(font, column, row, font.MAP.index(char))
30 | column += font.WIDTH
31 | if column >= tft.width() - font.WIDTH:
32 | row += font.HEIGHT
33 | column = 0
34 |
35 | if row > tft.height() - font.HEIGHT:
36 | row = 0
37 |
38 | if not fast:
39 | time.sleep(0.05)
40 |
41 | tft = tft_config.config(tft_config.TALL)
42 |
43 | tft.init()
44 |
45 | while True:
46 | for font in [font_16, font_32, font_64]:
47 | display_font(font)
48 |
49 | fast = not fast
50 |
51 |
52 | main()
53 |
--------------------------------------------------------------------------------
/examples/noto_fonts/NotoSans-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/examples/noto_fonts/NotoSans-Regular.ttf
--------------------------------------------------------------------------------
/examples/noto_fonts/NotoSansMono-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/examples/noto_fonts/NotoSansMono-Regular.ttf
--------------------------------------------------------------------------------
/examples/noto_fonts/NotoSerif-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/examples/noto_fonts/NotoSerif-Regular.ttf
--------------------------------------------------------------------------------
/examples/noto_fonts/noto_fonts.py:
--------------------------------------------------------------------------------
1 | """
2 | noto_fonts.py
3 | =============
4 |
5 | .. figure:: /_static/noto_fonts.png
6 | :align: center
7 |
8 |
9 | Writes the names of three Noto fonts centered on the display using the font. The fonts were
10 | converted from True Type fonts using the write_font_converter.py utility.
11 | """
12 |
13 | from machine import SPI, Pin
14 | import gc9a01
15 | import tft_config
16 |
17 | import NotoSans_32 as noto_sans
18 | import NotoSerif_32 as noto_serif
19 | import NotoSansMono_32 as noto_mono
20 |
21 |
22 | def main():
23 | def center(font, s, row, color=gc9a01.WHITE):
24 | screen = tft.width() # get screen width
25 | width = tft.write_len(font, s) # get the width of the string
26 | col = tft.width() // 2 - width // 2 if width and width < screen else 0
27 | tft.write(font, s, col, row, color) # and write the string
28 |
29 | tft = tft_config.config(tft_config.TALL)
30 |
31 | tft.init()
32 |
33 | # enable display and clear screen
34 | tft.init()
35 | tft.fill(gc9a01.BLACK)
36 |
37 | # center the name of the first font, using the font
38 | row = 16
39 | center(noto_sans, "NotoSans", row, gc9a01.RED)
40 | row += noto_sans.HEIGHT
41 |
42 | # center the name of the second font, using the font
43 | center(noto_serif, "NotoSerif", row, gc9a01.GREEN)
44 | row += noto_serif.HEIGHT
45 |
46 | # center the name of the third font, using the font
47 | center(noto_mono, "NotoSansMono", row, gc9a01.BLUE)
48 | row += noto_mono.HEIGHT
49 |
50 |
51 | main()
52 |
--------------------------------------------------------------------------------
/examples/pbitmap/bluemarble.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/examples/pbitmap/bluemarble.jpg
--------------------------------------------------------------------------------
/examples/pbitmap/bluemarble.py:
--------------------------------------------------------------------------------
1 | """
2 | bluemarble.py
3 | =============
4 |
5 | .. figure:: /_static/bluemarble.png
6 | :align: center
7 |
8 | Draw a full screen bitmap on the display.
9 |
10 | Convert bluemarble.jpg to bitmap module
11 |
12 | .. code-block:: console
13 |
14 | utils/image_converter.py bluemarble.jpg 8 >bluemarble.py
15 |
16 | Since the bitmap is large use mpy-cross to precompile the bluemarble.py module to save memory.
17 |
18 | .. code-block:: console
19 |
20 | mpy-cross bluemarble.py
21 |
22 | Upload the compiled bitmap module `bluemarble.mpy` and example program `pbitmap.py`
23 |
24 | Bluemarble image courtesy of the NASA image and video gallery available at
25 | https://images.nasa.gov/
26 | """
27 |
28 | import gc
29 | import time
30 | import gc9a01
31 | import tft_config
32 |
33 | import bluemarble_bitmap
34 |
35 |
36 | def main():
37 | """
38 | Draw the bitmap on the display
39 | """
40 | gc.enable()
41 | gc.collect()
42 |
43 | # initialize display
44 | tft = tft_config.config(tft_config.TALL)
45 |
46 | # enable display and clear screen
47 | tft.init()
48 | tft.fill(gc9a01.BLACK)
49 |
50 | # display bitmap
51 | tft.pbitmap(bluemarble_bitmap, 0, 0)
52 |
53 |
54 | main()
55 |
--------------------------------------------------------------------------------
/examples/prop_fonts/Chango-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/examples/prop_fonts/Chango-Regular.ttf
--------------------------------------------------------------------------------
/examples/prop_fonts/chango.py:
--------------------------------------------------------------------------------
1 | """
2 | chango.py
3 | =========
4 |
5 | .. figure:: /_static/chango.png
6 | :align: center
7 |
8 | Test for font2bitmap converter.
9 |
10 | """
11 |
12 | import gc9a01
13 | import tft_config
14 |
15 | import chango_16 as font_16
16 | import chango_32 as font_32
17 | import chango_64 as font_64
18 |
19 |
20 | def main():
21 | """
22 | Initializes and clears the screen. Writes different strings
23 | using different fonts to the display.
24 | """
25 | # initialize display
26 | tft = tft_config.config(tft_config.TALL)
27 |
28 | # enable display and clear screen
29 | tft.init()
30 | tft.fill(gc9a01.BLUE)
31 |
32 | row = 0
33 |
34 | tft.write(font_16, "abcdefghijklmnopqrstuvwxyz", 0, row, gc9a01.WHITE, gc9a01.BLUE)
35 | row += font_16.HEIGHT
36 |
37 | tft.write(font_32, "abcdefghijklm", 0, row, gc9a01.WHITE, gc9a01.BLUE)
38 | row += font_32.HEIGHT
39 |
40 | tft.write(font_32, "nopqrstuvwxy", 0, row, gc9a01.WHITE, gc9a01.BLUE)
41 | row += font_32.HEIGHT
42 |
43 | tft.write(font_64, "abcdef", 0, row, gc9a01.WHITE, gc9a01.BLUE)
44 | row += font_64.HEIGHT
45 |
46 | tft.write(font_64, "ghijkl", 0, row, gc9a01.WHITE, gc9a01.BLUE)
47 | row += font_64.HEIGHT
48 |
49 |
50 | main()
51 |
--------------------------------------------------------------------------------
/examples/proverbs/NotoSansSC-Regular.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/examples/proverbs/NotoSansSC-Regular.otf
--------------------------------------------------------------------------------
/examples/proverbs/make_proverbs_fonts.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | SIZE=20
4 | ../../utils/write_font_converter.py \
5 | -s "万事起头难。熟能生巧。冰冻三尺,非一日之寒。三个臭皮匠,胜过诸葛亮。今日事,今日毕。师父领进门,修行在个人。一口吃不成胖子。欲速则不达。百闻不如一见。不入虎穴,焉得虎子。" \
6 | NotoSansSC-Regular.otf ${SIZE} >proverbs_${SIZE}.py
7 |
8 | mpy-cross proverbs_${SIZE}.py
9 | mpremote cp proverbs_${SIZE}.mpy :
10 |
--------------------------------------------------------------------------------
/examples/proverbs/proverbs.py:
--------------------------------------------------------------------------------
1 | """
2 | proverbs.py
3 | ===========
4 |
5 | .. figure:: /_static/proverbs.png
6 | :align: center
7 |
8 | Test for TrueType write_font_converter.
9 |
10 | Displays what I hope are chinese proverbs in simplified chinese to test UTF-8 font support.
11 | The fonts were converted from True Type fonts using the
12 | :ref:`write_font_converter.py` utility.
13 |
14 | .. literalinclude:: ../../examples/proverbs/make_proverbs_fonts.sh
15 |
16 |
17 | .. note:: This example requires the following modules:
18 |
19 | .. hlist::
20 | :columns: 3
21 |
22 | - `gc9a01`
23 | - `tft_config`
24 | - `proverbs_20`
25 |
26 | """
27 |
28 | import utime
29 | import gc9a01
30 | import tft_config
31 | import proverbs_20 as font
32 |
33 |
34 | def color_wheel(WheelPos):
35 | """returns a 565 color from the given position of the color wheel"""
36 | WheelPos = (255 - WheelPos) % 255
37 |
38 | if WheelPos < 85:
39 | return gc9a01.color565(255 - WheelPos * 3, 0, WheelPos * 3)
40 |
41 | if WheelPos < 170:
42 | WheelPos -= 85
43 | return gc9a01.color565(0, WheelPos * 3, 255 - WheelPos * 3)
44 |
45 | WheelPos -= 170
46 | return gc9a01.color565(WheelPos * 3, 255 - WheelPos * 3, 0)
47 |
48 |
49 | def main():
50 | proverbs = [
51 | "万事起头难",
52 | "熟能生巧",
53 | "冰冻三尺 非一日之寒",
54 | "三个臭皮匠 胜过诸葛亮",
55 | "今日事 今日毕",
56 | "师父领进门 修行在个人",
57 | "一口吃不成胖子",
58 | "欲速则不达",
59 | "百闻不如一见",
60 | "不入虎穴 焉得虎子",
61 | ]
62 |
63 | tft = tft_config.config(tft_config.WIDE)
64 | tft.init()
65 |
66 | line_height = font.HEIGHT + 8
67 | half_height = tft.height() // 2
68 | half_width = tft.width() // 2
69 | wheel = 0
70 |
71 | while True:
72 | for proverb in proverbs:
73 | proverb_lines = proverb.split(" ")
74 | half_lines_height = len(proverb_lines) * line_height // 2
75 | tft.fill(gc9a01.BLACK)
76 |
77 | for count, proverb_line in enumerate(proverb_lines):
78 | half_length = tft.write_len(font, proverb_line) // 2
79 | tft.write(
80 | font,
81 | proverb_line,
82 | half_width - half_length,
83 | half_height - half_lines_height + count * line_height,
84 | color_wheel(wheel),
85 | )
86 |
87 | wheel = (wheel + 5) % 256
88 | # pause to slow down scrolling
89 | utime.sleep(5)
90 |
91 |
92 | main()
93 |
--------------------------------------------------------------------------------
/examples/rotations.py:
--------------------------------------------------------------------------------
1 | """
2 | rotations.py
3 | ============
4 |
5 | .. figure:: /_static/rotations.png
6 | :align: center
7 |
8 | Shows the effect of each of the 8 rotation values on the display.
9 | """
10 |
11 | import utime
12 | import gc9a01
13 | import tft_config
14 | import vga1_bold_16x32 as font
15 |
16 |
17 | def main():
18 | tft = tft_config.config(tft_config.TALL)
19 |
20 | tft.init()
21 | tft.fill(gc9a01.BLACK)
22 | utime.sleep(1)
23 |
24 | while True:
25 | for rot in range(8):
26 | tft.fill(gc9a01.BLACK)
27 | tft.rotation(rot)
28 | s = f"Rotation {rot}"
29 | tft.text(font, s, 40, 104, gc9a01.WHITE)
30 | utime.sleep(2)
31 |
32 |
33 | main()
34 |
--------------------------------------------------------------------------------
/examples/scroll.py:
--------------------------------------------------------------------------------
1 | """
2 | scroll.py
3 | =========
4 |
5 | Smoothly scroll all characters of a font up the display.
6 | Fonts heights must be even multiples of the screen height
7 | (i.e. 8 or 16 pixels high).
8 | """
9 |
10 | import time
11 | import s3lcd
12 | import tft_config
13 | import vga1_bold_16x32 as big
14 | import vga1_8x8 as small
15 |
16 |
17 | print(0)
18 | tft = tft_config.config(tft_config.WIDE)
19 |
20 |
21 | def cycle(p):
22 | try:
23 | len(p)
24 | except TypeError:
25 | cache = []
26 | for i in p:
27 | yield i
28 | cache.append(i)
29 | p = cache
30 | while p:
31 | yield from p
32 |
33 |
34 | def main():
35 |
36 | try:
37 | tft.init()
38 |
39 | color = cycle(
40 | (
41 | s3lcd.RED,
42 | s3lcd.GREEN,
43 | s3lcd.BLUE,
44 | s3lcd.CYAN,
45 | s3lcd.MAGENTA,
46 | s3lcd.YELLOW,
47 | s3lcd.WHITE,
48 | )
49 | )
50 |
51 | foreground = next(color)
52 | background = s3lcd.BLACK
53 |
54 | tft.fill(background)
55 |
56 | height = tft.height()
57 | width = tft.width()
58 |
59 | font = small if tft.width() < 96 else big
60 | line = height - font.HEIGHT
61 |
62 | while True:
63 | for character in range(font.FIRST, font.LAST + 1):
64 | # write character hex value as a string
65 | tft.text(font, f"x{character:02x}", 16, line, foreground, background)
66 |
67 | # write character using a integer (could be > 0x7f)
68 | tft.text(
69 | font,
70 | character,
71 | width - font.WIDTH * 2,
72 | line,
73 | foreground,
74 | background,
75 | )
76 |
77 | # change color for next line
78 | foreground = next(color)
79 |
80 | # next character with rollover at 256
81 | character = (character +1) % height
82 |
83 | # scroll the screen up by one character height
84 | for _ in range(font.HEIGHT // 2):
85 | tft.scroll(0, -2)
86 | tft.show()
87 |
88 | time.sleep(1)
89 |
90 | finally:
91 | tft.deinit()
92 |
93 |
94 | main()
95 |
--------------------------------------------------------------------------------
/examples/tiny_toasters/make_tiny_toast_bitmaps.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | ../../utils/sprites_converter.py tiny_toasters.bmp 32 32 3 -s > tiny_toasters_bitmaps.py
4 | mpy-cross tiny_toasters_bitmaps.py
5 | mpremote cp tiny_toasters_bitmaps.mpy :
6 |
--------------------------------------------------------------------------------
/examples/tiny_toasters/tiny_toasters.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/examples/tiny_toasters/tiny_toasters.bmp
--------------------------------------------------------------------------------
/examples/toasters/maketoast:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | #
4 | # grab sprites from spritesheet using ImageMagick and convert to bitmap format.
5 | #
6 | # spritesheet from CircuitPython_Flying_Toasters
7 | # https://learn.adafruit.com/circuitpython-sprite-animation-pendant-mario-clouds-flying-toasters
8 | #
9 |
10 | convert toasters.bmp -crop 64x64+64+0 t1.png
11 | convert toasters.bmp -crop 64x64+128+0 t2.png
12 | convert toasters.bmp -crop 64x64+192+0 t3.png
13 | convert toasters.bmp -crop 64x64+256+0 t4.png
14 | convert toasters.bmp -crop 64x64+320+0 t5.png
15 |
16 | # use 3 bits per pixel / 8 colors
17 |
18 | ../../utils/image_converter.py t1.png 3 -s >t1.py
19 | ../../utils/image_converter.py t2.png 3 -s >t2.py
20 | ../../utils/image_converter.py t3.png 3 -s >t3.py
21 | ../../utils/image_converter.py t4.png 3 -s >t4.py
22 | ../../utils/image_converter.py t5.png 3 -s >t5.py
23 |
24 | mpy-cross t1.py
25 | mpy-cross t2.py
26 | mpy-cross t3.py
27 | mpy-cross t4.py
28 | mpy-cross t5.py
29 |
30 | mpremote cp t1.mpy :
31 | mpremote cp t2.mpy :
32 | mpremote cp t3.mpy :
33 | mpremote cp t4.mpy :
34 | mpremote cp t5.mpy :
35 |
--------------------------------------------------------------------------------
/examples/toasters/t1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/examples/toasters/t1.png
--------------------------------------------------------------------------------
/examples/toasters/t2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/examples/toasters/t2.png
--------------------------------------------------------------------------------
/examples/toasters/t3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/examples/toasters/t3.png
--------------------------------------------------------------------------------
/examples/toasters/t4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/examples/toasters/t4.png
--------------------------------------------------------------------------------
/examples/toasters/t5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/examples/toasters/t5.png
--------------------------------------------------------------------------------
/examples/toasters/toasters.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/examples/toasters/toasters.bmp
--------------------------------------------------------------------------------
/examples/toasters/toasters.py:
--------------------------------------------------------------------------------
1 | """
2 | toasters.py
3 | ===========
4 |
5 | .. figure:: /_static/toasters.png
6 | :align: center
7 |
8 | An example using bitmap to draw sprites on the display.
9 |
10 | Spritesheet from CircuitPython_Flying_Toasters
11 | https://learn.adafruit.com/circuitpython-sprite-animation-pendant-mario-clouds-flying-toasters
12 | """
13 |
14 | import time
15 | import random
16 | import gc9a01
17 | import tft_config
18 |
19 | import t1, t2, t3, t4, t5
20 |
21 | TOASTERS = [t1, t2, t3, t4]
22 | TOAST = [t5]
23 |
24 |
25 | class Toast:
26 | """
27 | toast class to keep track of a sprites locaton and step
28 | """
29 |
30 | def __init__(self, sprites, x, y, width, height):
31 | self.sprites = sprites
32 | self.steps = len(sprites)
33 | self.x = x
34 | self.y = y
35 | self.step = random.randint(0, self.steps - 1)
36 | self.speed = random.randint(2, 5)
37 | self.width = width
38 | self.height = height
39 |
40 | def move(self):
41 | """
42 | Moves an object horizontally on the screen. If the object reaches the left
43 | edge of the screen, it resets its position and speed.
44 | """
45 | if self.x <= 0:
46 | self.speed = random.randint(2, 5)
47 | self.x = self.width - 64
48 |
49 | self.step += 1
50 | self.step %= self.steps
51 | self.x -= self.speed
52 |
53 |
54 | def main():
55 | """
56 | Draw and move sprite
57 | """
58 | tft = tft_config.config(tft_config.TALL)
59 |
60 | # enable display and clear screen
61 | tft.init()
62 | tft.fill(gc9a01.BLACK)
63 |
64 | # cache width and height
65 | width = tft.width()
66 | height = tft.height()
67 |
68 | # create toast spites in random positions
69 | sprites = [
70 | Toast(TOASTERS, width - 64, 0, width, height),
71 | Toast(TOAST, width - 64 * 2, 80, width, height),
72 | Toast(TOASTERS, width - 64 * 4, 160, width, height),
73 | ]
74 |
75 | # move and draw sprites
76 | while True:
77 | for man in sprites:
78 | bitmap = man.sprites[man.step]
79 | tft.fill_rect(
80 | man.x + bitmap.WIDTH - man.speed,
81 | man.y,
82 | man.speed,
83 | bitmap.HEIGHT,
84 | gc9a01.BLACK,
85 | )
86 |
87 | man.move()
88 |
89 | if man.x > 0:
90 | tft.bitmap(bitmap, man.x, man.y)
91 | else:
92 | tft.fill_rect(0, man.y, bitmap.WIDTH, bitmap.HEIGHT, gc9a01.BLACK)
93 |
94 | time.sleep(0.05)
95 |
96 |
97 | main()
98 |
--------------------------------------------------------------------------------
/examples/watch/LibreBaskerville-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/examples/watch/LibreBaskerville-Regular.ttf
--------------------------------------------------------------------------------
/examples/watch/create_face_jpg.py:
--------------------------------------------------------------------------------
1 | """
2 | Create a watch face_{width}x{height}.jpg file for a given width and height.
3 | """
4 |
5 | import math
6 | from PIL import Image, ImageDraw, ImageFont
7 |
8 |
9 | def maon():
10 | """
11 | Create a watch face_{width}x{height}.jpg file for a given width and height.
12 | """
13 |
14 | width = 320 # width of the display
15 | height = 240 # height of the display
16 | face = min(width, height) # face is the smaller of the two
17 | ofs = (width - face) // 2 # offset from the left side of the display
18 |
19 | # create an image
20 | out = Image.new("RGB", (width, height), (255, 255, 255))
21 |
22 | fnt = ImageFont.truetype(
23 | "./LibreBaskerville-Regular.ttf", 18
24 | ) # get a font of an appropriate size
25 | d = ImageDraw.Draw(out) # get a drawing context
26 | cx = int(face // 2) # center x of the clock face
27 |
28 | second = 0
29 | for minute in range(1, 60):
30 | # get the angle of the minute hand
31 | angle = (minute * math.pi / 30) + (second * math.pi / 1800)
32 | cos_a = math.cos(angle)
33 | sin_a = math.sin(angle)
34 |
35 | # x and y coordinates of the outer minute tick
36 | y1 = -cx * cos_a * 0.76
37 | x1 = cx * sin_a * 0.76
38 |
39 | # x and y coordinates of the inner minute tick
40 | y2 = -cx * cos_a * 0.7
41 | x2 = cx * sin_a * 0.7
42 |
43 | # draw the minute tick
44 | d.line(
45 | [ofs + x1 + cx, y1 + cx, ofs + x2 + cx, y2 + cx], width=1, fill="#000000"
46 | )
47 |
48 | for hour in range(1, 13):
49 | # get the angle of the hour hand
50 | angle = hour * math.pi / 6
51 | cos_a = math.cos(angle)
52 | sin_a = math.sin(angle)
53 |
54 | # x and y coordinates of the outer hour tick
55 | y1 = -cx * cos_a * 0.76
56 | x1 = cx * sin_a * 0.76
57 |
58 | # x and y coordinates of the inner hour tick
59 | y2 = -cx * cos_a * 0.7
60 | x2 = cx * sin_a * 0.7
61 |
62 | # draw the hour tick
63 | d.line(
64 | [ofs + x1 + cx, y1 + cx, ofs + x2 + cx, y2 + cx], width=5, fill="#ff0000"
65 | )
66 |
67 | # x and y coordinates of the hour number
68 | y = -cx * cos_a * 0.9
69 | x = cx * sin_a * 0.9
70 |
71 | # draw the hour number in our previously selected font
72 | size = d.textbbox((0, 0), str(hour), font=fnt)
73 | d.text(
74 | (
75 | ofs + x + cx - ((size[2] + size[0] >> 1)),
76 | y + cx - ((size[3] + size[1]) >> 1),
77 | ),
78 | str(hour),
79 | font=fnt,
80 | fill=(0, 0, 0),
81 | align="center",
82 | )
83 |
84 | # save the face as a jpeg file
85 | out.save(f"face_{width}x{height}.jpg", "JPEG")
86 | # out.show()
87 |
--------------------------------------------------------------------------------
/examples/watch/face_128x128.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/examples/watch/face_128x128.jpg
--------------------------------------------------------------------------------
/examples/watch/face_160x128.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/examples/watch/face_160x128.jpg
--------------------------------------------------------------------------------
/examples/watch/face_240x135.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/examples/watch/face_240x135.jpg
--------------------------------------------------------------------------------
/examples/watch/face_240x240.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/examples/watch/face_240x240.jpg
--------------------------------------------------------------------------------
/examples/watch/face_320x240.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/examples/watch/face_320x240.jpg
--------------------------------------------------------------------------------
/firmware/ADAFRUIT_FEATHER_RP2040/firmware.uf2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/firmware/ADAFRUIT_FEATHER_RP2040/firmware.uf2
--------------------------------------------------------------------------------
/firmware/ADAFRUIT_ITSYBITSY_RP2040/firmware.uf2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/firmware/ADAFRUIT_ITSYBITSY_RP2040/firmware.uf2
--------------------------------------------------------------------------------
/firmware/ADAFRUIT_QTPY_RP2040/firmware.uf2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/firmware/ADAFRUIT_QTPY_RP2040/firmware.uf2
--------------------------------------------------------------------------------
/firmware/ARDUINO_NANO_ESP32/firmware.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/firmware/ARDUINO_NANO_ESP32/firmware.bin
--------------------------------------------------------------------------------
/firmware/ARDUINO_NANO_RP2040_CONNECT/firmware.uf2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/firmware/ARDUINO_NANO_RP2040_CONNECT/firmware.uf2
--------------------------------------------------------------------------------
/firmware/ESP32_GENERIC/firmware_16MiB.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/firmware/ESP32_GENERIC/firmware_16MiB.bin
--------------------------------------------------------------------------------
/firmware/ESP32_GENERIC/firmware_32MiB.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/firmware/ESP32_GENERIC/firmware_32MiB.bin
--------------------------------------------------------------------------------
/firmware/ESP32_GENERIC/firmware_4MiB.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/firmware/ESP32_GENERIC/firmware_4MiB.bin
--------------------------------------------------------------------------------
/firmware/ESP32_GENERIC/firmware_8MiB.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/firmware/ESP32_GENERIC/firmware_8MiB.bin
--------------------------------------------------------------------------------
/firmware/ESP32_GENERIC/firmware_SPIRAM_16MiB.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/firmware/ESP32_GENERIC/firmware_SPIRAM_16MiB.bin
--------------------------------------------------------------------------------
/firmware/ESP32_GENERIC/firmware_SPIRAM_32MiB.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/firmware/ESP32_GENERIC/firmware_SPIRAM_32MiB.bin
--------------------------------------------------------------------------------
/firmware/ESP32_GENERIC/firmware_SPIRAM_4MiB.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/firmware/ESP32_GENERIC/firmware_SPIRAM_4MiB.bin
--------------------------------------------------------------------------------
/firmware/ESP32_GENERIC/firmware_SPIRAM_8MiB.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/firmware/ESP32_GENERIC/firmware_SPIRAM_8MiB.bin
--------------------------------------------------------------------------------
/firmware/ESP32_GENERIC/firmware_UNICORE_16MiB.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/firmware/ESP32_GENERIC/firmware_UNICORE_16MiB.bin
--------------------------------------------------------------------------------
/firmware/ESP32_GENERIC/firmware_UNICORE_32MiB.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/firmware/ESP32_GENERIC/firmware_UNICORE_32MiB.bin
--------------------------------------------------------------------------------
/firmware/ESP32_GENERIC/firmware_UNICORE_4MiB.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/firmware/ESP32_GENERIC/firmware_UNICORE_4MiB.bin
--------------------------------------------------------------------------------
/firmware/ESP32_GENERIC/firmware_UNICORE_8MiB.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/firmware/ESP32_GENERIC/firmware_UNICORE_8MiB.bin
--------------------------------------------------------------------------------
/firmware/ESP32_GENERIC_C3/firmware_16MiB.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/firmware/ESP32_GENERIC_C3/firmware_16MiB.bin
--------------------------------------------------------------------------------
/firmware/ESP32_GENERIC_C3/firmware_32MiB.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/firmware/ESP32_GENERIC_C3/firmware_32MiB.bin
--------------------------------------------------------------------------------
/firmware/ESP32_GENERIC_C3/firmware_4MiB.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/firmware/ESP32_GENERIC_C3/firmware_4MiB.bin
--------------------------------------------------------------------------------
/firmware/ESP32_GENERIC_C3/firmware_8MiB.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/firmware/ESP32_GENERIC_C3/firmware_8MiB.bin
--------------------------------------------------------------------------------
/firmware/ESP32_GENERIC_S2/firmware_16MiB.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/firmware/ESP32_GENERIC_S2/firmware_16MiB.bin
--------------------------------------------------------------------------------
/firmware/ESP32_GENERIC_S2/firmware_32MiB.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/firmware/ESP32_GENERIC_S2/firmware_32MiB.bin
--------------------------------------------------------------------------------
/firmware/ESP32_GENERIC_S2/firmware_4MiB.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/firmware/ESP32_GENERIC_S2/firmware_4MiB.bin
--------------------------------------------------------------------------------
/firmware/ESP32_GENERIC_S2/firmware_8MiB.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/firmware/ESP32_GENERIC_S2/firmware_8MiB.bin
--------------------------------------------------------------------------------
/firmware/ESP32_GENERIC_S3/firmware_16MiB.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/firmware/ESP32_GENERIC_S3/firmware_16MiB.bin
--------------------------------------------------------------------------------
/firmware/ESP32_GENERIC_S3/firmware_32MiB.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/firmware/ESP32_GENERIC_S3/firmware_32MiB.bin
--------------------------------------------------------------------------------
/firmware/ESP32_GENERIC_S3/firmware_4MiB.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/firmware/ESP32_GENERIC_S3/firmware_4MiB.bin
--------------------------------------------------------------------------------
/firmware/ESP32_GENERIC_S3/firmware_8MiB.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/firmware/ESP32_GENERIC_S3/firmware_8MiB.bin
--------------------------------------------------------------------------------
/firmware/ESP32_GENERIC_S3/firmware_SPIRAM_OCT_16MiB.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/firmware/ESP32_GENERIC_S3/firmware_SPIRAM_OCT_16MiB.bin
--------------------------------------------------------------------------------
/firmware/ESP32_GENERIC_S3/firmware_SPIRAM_OCT_32MiB.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/firmware/ESP32_GENERIC_S3/firmware_SPIRAM_OCT_32MiB.bin
--------------------------------------------------------------------------------
/firmware/ESP32_GENERIC_S3/firmware_SPIRAM_OCT_4MiB.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/firmware/ESP32_GENERIC_S3/firmware_SPIRAM_OCT_4MiB.bin
--------------------------------------------------------------------------------
/firmware/ESP32_GENERIC_S3/firmware_SPIRAM_OCT_8MiB.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/firmware/ESP32_GENERIC_S3/firmware_SPIRAM_OCT_8MiB.bin
--------------------------------------------------------------------------------
/firmware/GARATRONIC_PYBSTICK26_RP2040/firmware.uf2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/firmware/GARATRONIC_PYBSTICK26_RP2040/firmware.uf2
--------------------------------------------------------------------------------
/firmware/LILYGO_TTGO_LORA32/firmware.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/firmware/LILYGO_TTGO_LORA32/firmware.bin
--------------------------------------------------------------------------------
/firmware/LOLIN_C3_MINI/firmware.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/firmware/LOLIN_C3_MINI/firmware.bin
--------------------------------------------------------------------------------
/firmware/LOLIN_S2_MINI/firmware.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/firmware/LOLIN_S2_MINI/firmware.bin
--------------------------------------------------------------------------------
/firmware/LOLIN_S2_PICO/firmware.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/firmware/LOLIN_S2_PICO/firmware.bin
--------------------------------------------------------------------------------
/firmware/M5STACK_ATOM/firmware.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/firmware/M5STACK_ATOM/firmware.bin
--------------------------------------------------------------------------------
/firmware/NULLBITS_BIT_C_PRO/firmware.uf2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/firmware/NULLBITS_BIT_C_PRO/firmware.uf2
--------------------------------------------------------------------------------
/firmware/OLIMEX_ESP32_POE/firmware.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/firmware/OLIMEX_ESP32_POE/firmware.bin
--------------------------------------------------------------------------------
/firmware/PIMORONI_PICOLIPO_16MB/firmware.uf2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/firmware/PIMORONI_PICOLIPO_16MB/firmware.uf2
--------------------------------------------------------------------------------
/firmware/PIMORONI_PICOLIPO_4MB/firmware.uf2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/firmware/PIMORONI_PICOLIPO_4MB/firmware.uf2
--------------------------------------------------------------------------------
/firmware/PIMORONI_TINY2040/firmware.uf2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/firmware/PIMORONI_TINY2040/firmware.uf2
--------------------------------------------------------------------------------
/firmware/RPI_PICO/firmware.uf2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/firmware/RPI_PICO/firmware.uf2
--------------------------------------------------------------------------------
/firmware/RPI_PICO2/firmware.uf2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/firmware/RPI_PICO2/firmware.uf2
--------------------------------------------------------------------------------
/firmware/RPI_PICO2_W/firmware.uf2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/firmware/RPI_PICO2_W/firmware.uf2
--------------------------------------------------------------------------------
/firmware/RPI_PICO_W/firmware.uf2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/firmware/RPI_PICO_W/firmware.uf2
--------------------------------------------------------------------------------
/firmware/SIL_RP2040_SHIM/firmware.uf2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/firmware/SIL_RP2040_SHIM/firmware.uf2
--------------------------------------------------------------------------------
/firmware/SIL_WESP32/firmware.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/firmware/SIL_WESP32/firmware.bin
--------------------------------------------------------------------------------
/firmware/SPARKFUN_PROMICRO/firmware.uf2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/firmware/SPARKFUN_PROMICRO/firmware.uf2
--------------------------------------------------------------------------------
/firmware/SPARKFUN_THINGPLUS/firmware.uf2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/firmware/SPARKFUN_THINGPLUS/firmware.uf2
--------------------------------------------------------------------------------
/firmware/UM_FEATHERS2/firmware.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/firmware/UM_FEATHERS2/firmware.bin
--------------------------------------------------------------------------------
/firmware/UM_FEATHERS2NEO/firmware.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/firmware/UM_FEATHERS2NEO/firmware.bin
--------------------------------------------------------------------------------
/firmware/UM_FEATHERS3/firmware.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/firmware/UM_FEATHERS3/firmware.bin
--------------------------------------------------------------------------------
/firmware/UM_NANOS3/firmware.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/firmware/UM_NANOS3/firmware.bin
--------------------------------------------------------------------------------
/firmware/UM_PROS3/firmware.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/firmware/UM_PROS3/firmware.bin
--------------------------------------------------------------------------------
/firmware/UM_TINYPICO/firmware.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/firmware/UM_TINYPICO/firmware.bin
--------------------------------------------------------------------------------
/firmware/UM_TINYS2/firmware.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/firmware/UM_TINYS2/firmware.bin
--------------------------------------------------------------------------------
/firmware/UM_TINYS3/firmware.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/firmware/UM_TINYS3/firmware.bin
--------------------------------------------------------------------------------
/firmware/UM_TINYWATCHS3/firmware.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/firmware/UM_TINYWATCHS3/firmware.bin
--------------------------------------------------------------------------------
/firmware/W5100S_EVB_PICO/firmware.uf2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/firmware/W5100S_EVB_PICO/firmware.uf2
--------------------------------------------------------------------------------
/firmware/W5500_EVB_PICO/firmware.uf2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/firmware/W5500_EVB_PICO/firmware.uf2
--------------------------------------------------------------------------------
/firmware/WEACTSTUDIO/firmware.uf2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/firmware/WEACTSTUDIO/firmware.uf2
--------------------------------------------------------------------------------
/firmware/WEACTSTUDIO/firmware_FLASH_2MB.uf2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/firmware/WEACTSTUDIO/firmware_FLASH_2MB.uf2
--------------------------------------------------------------------------------
/firmware/WEACTSTUDIO/firmware_FLASH_4MB.uf2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/firmware/WEACTSTUDIO/firmware_FLASH_4MB.uf2
--------------------------------------------------------------------------------
/firmware/WEACTSTUDIO/firmware_FLASH_8MB.uf2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/firmware/WEACTSTUDIO/firmware_FLASH_8MB.uf2
--------------------------------------------------------------------------------
/fonts/bitmap/README.md:
--------------------------------------------------------------------------------
1 | # Included Font Files
2 |
3 | Frozen font files are included in the firmware.
4 |
5 | ## Bit mapped fonts for use with Text method
6 |
7 | The font_from_romfont utility can convert fonts from the font-bin directory of
8 | spacerace's https://github.com/spacerace/romfont repo.
9 |
10 | ### 128 Character Bit Mapped Fonts
11 |
12 | Frozen | Font | Example
13 | ------ | ------------------------------------------------------ | -----------------------------
14 | Yes | [vga1_8x8.py](/fonts/bitmap/vga1_8x8.py) | 
15 | Yes | [vga1_16x16.py](/fonts/bitmap/vga1_16x16.py) | 
16 | Yes | [vga1_16x32.py](/fonts/bitmap/vga1_16x32.py) | 
17 | Yes | [vga1_bold_16x16.py](/fonts/bitmap/vga1_bold_16x16.py) | 
18 | Yes | [vga1_bold_16x32.py](/fonts/bitmap/vga1_bold_16x32.py) | 
19 |
20 |
21 | ### 256 Character Bit Mapped Fonts
22 |
23 | Frozen | Font | Example
24 | ------ | ------------------------------------------------------ | --------------------------
25 | No | [vga2_8x8.py](/fonts/bitmap/vga2_8x8.py) | 
26 | No | [vga2_8x16.py](/fonts/bitmap/vga2_8x16.py) | 
27 | No | [vga2_16x16.py](/fonts/bitmap/vga2_16x16.py) | 
28 | No | [vga2_16x32.py](/fonts/bitmap/vga2_16x32.py) | 
29 | No | [vga2_bold_16x16.py](/fonts/bitmap/vga2_bold_16x16.py) | 
30 | No | [vga2_bold_16x32.py](/fonts/bitmap/vga2_bold_16x32.py) | 
31 |
--------------------------------------------------------------------------------
/fonts/bitmap/vga1_bold_16x32.mpy:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/fonts/bitmap/vga1_bold_16x32.mpy
--------------------------------------------------------------------------------
/fonts/bitmap/vga_8x16.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/fonts/bitmap/vga_8x16.bin
--------------------------------------------------------------------------------
/fonts/bitmap/vga_8x8.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/fonts/bitmap/vga_8x8.bin
--------------------------------------------------------------------------------
/fonts/vector/README.md:
--------------------------------------------------------------------------------
1 | # Included Font Files
2 |
3 | Frozen font files are included in the firmware.
4 |
5 | ## Vector fonts for use with the Draw method
6 |
7 | ### Hershey Vector Fonts
8 |
9 | Frozen | Font | Example
10 | ------ | ---------------------------------------- | ----------------------------------------
11 | No | [astrol.py](/fonts/vector/astrol.py) | 
12 | Yes | [cyrilc.py](/fonts/vector/cyrilc.py) | 
13 | Yes | [gotheng.py](/fonts/vector/gotheng.py) | 
14 | Yes | [gothger.py](/fonts/vector/gothger.py) | 
15 | Yes | [gothita.py](/fonts/vector/gothita.py) | 
16 | Yes | [greekc.py](/fonts/vector/greekc.py) | 
17 | Yes | [greekcs.py](/fonts/vector/greekcs.py) | 
18 | Yes | [greekp.py](/fonts/vector/greekp.py) | 
19 | Yes | [greeks.py](/fonts/vector/greeks.py) | 
20 | Yes | [italicc.py](/fonts/vector/italicc.py) | 
21 | Yes | [italiccs.py](/fonts/vector/italiccs.py) | 
22 | Yes | [italict.py](/fonts/vector/italict.py) | 
23 | Yes | [lowmat.py](/fonts/vector/lowmat.py) | 
24 | Yes | [marker.py](/fonts/vector/marker.py) | 
25 | Yes | [meteo.py](/fonts/vector/meteo.py) | 
26 | Yes | [music.py](/fonts/vector/music.py) | 
27 | Yes | [romanc.py](/fonts/vector/romanc.py) | 
28 | Yes | [romancs.py](/fonts/vector/romancs.py) | 
29 | Yes | [romand.py](/fonts/vector/romand.py) | 
30 | Yes | [romanp.py](/fonts/vector/romanp.py) | 
31 | Yes | [romans.py](/fonts/vector/romans.py) | 
32 | Yes | [romant.py](/fonts/vector/romant.py) | 
33 | Yes | [scriptc.py](/fonts/vector/scriptc.py) | 
34 | Yes | [scripts.py](/fonts/vector/scripts.py) | 
35 | Yes | [symbol.py](/fonts/vector/symbol.py) | 
36 | Yes | [uppmat.py](/fonts/vector/uppmat.py) | 
37 |
--------------------------------------------------------------------------------
/manifest.py:
--------------------------------------------------------------------------------
1 | include("$(PORT_DIR)/boards/manifest.py")
2 | freeze("modules")
3 |
--------------------------------------------------------------------------------
/micropython.mk:
--------------------------------------------------------------------------------
1 | CEXAMPLE_MOD_DIR := $(USERMOD_DIR)
2 |
3 | # Add all C files to SRC_USERMOD.
4 | SRC_USERMOD += $(CEXAMPLE_MOD_DIR)/examplemodule.c
5 |
6 | # We can add our module folder to include paths if needed
7 | # This is not actually needed in this example.
8 | CFLAGS_USERMOD += -I$(CEXAMPLE_MOD_DIR)
9 |
--------------------------------------------------------------------------------
/modules/df.py:
--------------------------------------------------------------------------------
1 | import uos
2 | fs_stat = uos.statvfs('/flash')
3 | fs_size = fs_stat[0] * fs_stat[2]
4 | fs_free = fs_stat[0] * fs_stat[3]
5 | print("File System Size {:,} - Free Space {:,}".format(fs_size, fs_free))
6 |
--------------------------------------------------------------------------------
/modules/mf.py:
--------------------------------------------------------------------------------
1 | import gc
2 |
3 | print("Allocating 1K bytes until memory is full... ", end='')
4 | memory = []
5 | i = 0
6 | gc.collect()
7 |
8 | try:
9 | while True:
10 | memory.append(bytearray(1024))
11 | i += 1
12 |
13 | except MemoryError:
14 | gc.collect()
15 | print(f'{i}K bytes Allocated.')
16 |
--------------------------------------------------------------------------------
/modules/vga1_8x8.py:
--------------------------------------------------------------------------------
1 | """converted from vga_8x8.bin """
2 | WIDTH = 8
3 | HEIGHT = 8
4 | FIRST = 0x20
5 | LAST = 0x7f
6 | _FONT =\
7 | b'\x00\x00\x00\x00\x00\x00\x00\x00'\
8 | b'\x18\x3c\x3c\x18\x18\x00\x18\x00'\
9 | b'\x66\x66\x24\x00\x00\x00\x00\x00'\
10 | b'\x6c\x6c\xfe\x6c\xfe\x6c\x6c\x00'\
11 | b'\x18\x3e\x60\x3c\x06\x7c\x18\x00'\
12 | b'\x00\xc6\xcc\x18\x30\x66\xc6\x00'\
13 | b'\x38\x6c\x38\x76\xdc\xcc\x76\x00'\
14 | b'\x18\x18\x30\x00\x00\x00\x00\x00'\
15 | b'\x0c\x18\x30\x30\x30\x18\x0c\x00'\
16 | b'\x30\x18\x0c\x0c\x0c\x18\x30\x00'\
17 | b'\x00\x66\x3c\xff\x3c\x66\x00\x00'\
18 | b'\x00\x18\x18\x7e\x18\x18\x00\x00'\
19 | b'\x00\x00\x00\x00\x00\x18\x18\x30'\
20 | b'\x00\x00\x00\x7e\x00\x00\x00\x00'\
21 | b'\x00\x00\x00\x00\x00\x18\x18\x00'\
22 | b'\x06\x0c\x18\x30\x60\xc0\x80\x00'\
23 | b'\x38\x6c\xc6\xd6\xc6\x6c\x38\x00'\
24 | b'\x18\x38\x18\x18\x18\x18\x7e\x00'\
25 | b'\x7c\xc6\x06\x1c\x30\x66\xfe\x00'\
26 | b'\x7c\xc6\x06\x3c\x06\xc6\x7c\x00'\
27 | b'\x1c\x3c\x6c\xcc\xfe\x0c\x1e\x00'\
28 | b'\xfe\xc0\xc0\xfc\x06\xc6\x7c\x00'\
29 | b'\x38\x60\xc0\xfc\xc6\xc6\x7c\x00'\
30 | b'\xfe\xc6\x0c\x18\x30\x30\x30\x00'\
31 | b'\x7c\xc6\xc6\x7c\xc6\xc6\x7c\x00'\
32 | b'\x7c\xc6\xc6\x7e\x06\x0c\x78\x00'\
33 | b'\x00\x18\x18\x00\x00\x18\x18\x00'\
34 | b'\x00\x18\x18\x00\x00\x18\x18\x30'\
35 | b'\x06\x0c\x18\x30\x18\x0c\x06\x00'\
36 | b'\x00\x00\x7e\x00\x00\x7e\x00\x00'\
37 | b'\x60\x30\x18\x0c\x18\x30\x60\x00'\
38 | b'\x7c\xc6\x0c\x18\x18\x00\x18\x00'\
39 | b'\x7c\xc6\xde\xde\xde\xc0\x78\x00'\
40 | b'\x38\x6c\xc6\xfe\xc6\xc6\xc6\x00'\
41 | b'\xfc\x66\x66\x7c\x66\x66\xfc\x00'\
42 | b'\x3c\x66\xc0\xc0\xc0\x66\x3c\x00'\
43 | b'\xf8\x6c\x66\x66\x66\x6c\xf8\x00'\
44 | b'\xfe\x62\x68\x78\x68\x62\xfe\x00'\
45 | b'\xfe\x62\x68\x78\x68\x60\xf0\x00'\
46 | b'\x3c\x66\xc0\xc0\xce\x66\x3a\x00'\
47 | b'\xc6\xc6\xc6\xfe\xc6\xc6\xc6\x00'\
48 | b'\x3c\x18\x18\x18\x18\x18\x3c\x00'\
49 | b'\x1e\x0c\x0c\x0c\xcc\xcc\x78\x00'\
50 | b'\xe6\x66\x6c\x78\x6c\x66\xe6\x00'\
51 | b'\xf0\x60\x60\x60\x62\x66\xfe\x00'\
52 | b'\xc6\xee\xfe\xfe\xd6\xc6\xc6\x00'\
53 | b'\xc6\xe6\xf6\xde\xce\xc6\xc6\x00'\
54 | b'\x7c\xc6\xc6\xc6\xc6\xc6\x7c\x00'\
55 | b'\xfc\x66\x66\x7c\x60\x60\xf0\x00'\
56 | b'\x7c\xc6\xc6\xc6\xc6\xce\x7c\x0e'\
57 | b'\xfc\x66\x66\x7c\x6c\x66\xe6\x00'\
58 | b'\x3c\x66\x30\x18\x0c\x66\x3c\x00'\
59 | b'\x7e\x7e\x5a\x18\x18\x18\x3c\x00'\
60 | b'\xc6\xc6\xc6\xc6\xc6\xc6\x7c\x00'\
61 | b'\xc6\xc6\xc6\xc6\xc6\x6c\x38\x00'\
62 | b'\xc6\xc6\xc6\xd6\xd6\xfe\x6c\x00'\
63 | b'\xc6\xc6\x6c\x38\x6c\xc6\xc6\x00'\
64 | b'\x66\x66\x66\x3c\x18\x18\x3c\x00'\
65 | b'\xfe\xc6\x8c\x18\x32\x66\xfe\x00'\
66 | b'\x3c\x30\x30\x30\x30\x30\x3c\x00'\
67 | b'\xc0\x60\x30\x18\x0c\x06\x02\x00'\
68 | b'\x3c\x0c\x0c\x0c\x0c\x0c\x3c\x00'\
69 | b'\x10\x38\x6c\xc6\x00\x00\x00\x00'\
70 | b'\x00\x00\x00\x00\x00\x00\x00\xff'\
71 | b'\x30\x18\x0c\x00\x00\x00\x00\x00'\
72 | b'\x00\x00\x78\x0c\x7c\xcc\x76\x00'\
73 | b'\xe0\x60\x7c\x66\x66\x66\xdc\x00'\
74 | b'\x00\x00\x7c\xc6\xc0\xc6\x7c\x00'\
75 | b'\x1c\x0c\x7c\xcc\xcc\xcc\x76\x00'\
76 | b'\x00\x00\x7c\xc6\xfe\xc0\x7c\x00'\
77 | b'\x3c\x66\x60\xf8\x60\x60\xf0\x00'\
78 | b'\x00\x00\x76\xcc\xcc\x7c\x0c\xf8'\
79 | b'\xe0\x60\x6c\x76\x66\x66\xe6\x00'\
80 | b'\x18\x00\x38\x18\x18\x18\x3c\x00'\
81 | b'\x06\x00\x06\x06\x06\x66\x66\x3c'\
82 | b'\xe0\x60\x66\x6c\x78\x6c\xe6\x00'\
83 | b'\x38\x18\x18\x18\x18\x18\x3c\x00'\
84 | b'\x00\x00\xec\xfe\xd6\xd6\xd6\x00'\
85 | b'\x00\x00\xdc\x66\x66\x66\x66\x00'\
86 | b'\x00\x00\x7c\xc6\xc6\xc6\x7c\x00'\
87 | b'\x00\x00\xdc\x66\x66\x7c\x60\xf0'\
88 | b'\x00\x00\x76\xcc\xcc\x7c\x0c\x1e'\
89 | b'\x00\x00\xdc\x76\x60\x60\xf0\x00'\
90 | b'\x00\x00\x7e\xc0\x7c\x06\xfc\x00'\
91 | b'\x30\x30\xfc\x30\x30\x36\x1c\x00'\
92 | b'\x00\x00\xcc\xcc\xcc\xcc\x76\x00'\
93 | b'\x00\x00\xc6\xc6\xc6\x6c\x38\x00'\
94 | b'\x00\x00\xc6\xd6\xd6\xfe\x6c\x00'\
95 | b'\x00\x00\xc6\x6c\x38\x6c\xc6\x00'\
96 | b'\x00\x00\xc6\xc6\xc6\x7e\x06\xfc'\
97 | b'\x00\x00\x7e\x4c\x18\x32\x7e\x00'\
98 | b'\x0e\x18\x18\x70\x18\x18\x0e\x00'\
99 | b'\x18\x18\x18\x18\x18\x18\x18\x00'\
100 | b'\x70\x18\x18\x0e\x18\x18\x70\x00'\
101 | b'\x76\xdc\x00\x00\x00\x00\x00\x00'\
102 | b'\x00\x10\x38\x6c\xc6\xc6\xfe\x00'\
103 |
104 | FONT = memoryview(_FONT)
105 |
--------------------------------------------------------------------------------
/sphinx/Makefile:
--------------------------------------------------------------------------------
1 | # Minimal makefile for Sphinx documentation
2 | #
3 |
4 | # You can set these variables from the command line, and also
5 | # from the environment for the first two.
6 | SPHINXOPTS ?=
7 | SPHINXBUILD ?= sphinx-build
8 | SOURCEDIR = .
9 | BUILDDIR = _build
10 |
11 | # Put it first so that "make" without argument is like "make help".
12 | help:
13 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14 |
15 | .PHONY: help Makefile
16 |
17 | # Catch-all target: route all unknown targets to Sphinx using the new
18 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19 | %: Makefile
20 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
21 |
--------------------------------------------------------------------------------
/sphinx/_static/GC9A01.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/sphinx/_static/GC9A01.jpg
--------------------------------------------------------------------------------
/sphinx/_static/alien.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/sphinx/_static/alien.bmp
--------------------------------------------------------------------------------
/sphinx/_static/alien.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/sphinx/_static/alien.png
--------------------------------------------------------------------------------
/sphinx/_static/arcs.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/sphinx/_static/arcs.bmp
--------------------------------------------------------------------------------
/sphinx/_static/arcs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/sphinx/_static/arcs.png
--------------------------------------------------------------------------------
/sphinx/_static/bitarray.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/sphinx/_static/bitarray.bmp
--------------------------------------------------------------------------------
/sphinx/_static/bitarray.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/sphinx/_static/bitarray.png
--------------------------------------------------------------------------------
/sphinx/_static/bluemarble.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/sphinx/_static/bluemarble.bmp
--------------------------------------------------------------------------------
/sphinx/_static/bluemarble.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/sphinx/_static/bluemarble.png
--------------------------------------------------------------------------------
/sphinx/_static/chango.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/sphinx/_static/chango.bmp
--------------------------------------------------------------------------------
/sphinx/_static/chango.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/sphinx/_static/chango.png
--------------------------------------------------------------------------------
/sphinx/_static/feathers.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/sphinx/_static/feathers.png
--------------------------------------------------------------------------------
/sphinx/_static/fonts.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/sphinx/_static/fonts.bmp
--------------------------------------------------------------------------------
/sphinx/_static/fonts.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/sphinx/_static/fonts.png
--------------------------------------------------------------------------------
/sphinx/_static/hello.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/sphinx/_static/hello.png
--------------------------------------------------------------------------------
/sphinx/_static/hello_world.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/sphinx/_static/hello_world.jpeg
--------------------------------------------------------------------------------
/sphinx/_static/hello_world.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/sphinx/_static/hello_world.png
--------------------------------------------------------------------------------
/sphinx/_static/hershey.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/sphinx/_static/hershey.png
--------------------------------------------------------------------------------
/sphinx/_static/jpg_test.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/sphinx/_static/jpg_test.bmp
--------------------------------------------------------------------------------
/sphinx/_static/jpg_test.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/sphinx/_static/jpg_test.png
--------------------------------------------------------------------------------
/sphinx/_static/lines.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/sphinx/_static/lines.bmp
--------------------------------------------------------------------------------
/sphinx/_static/lines.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/sphinx/_static/lines.png
--------------------------------------------------------------------------------
/sphinx/_static/mono_fonts.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/sphinx/_static/mono_fonts.bmp
--------------------------------------------------------------------------------
/sphinx/_static/mono_fonts.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/sphinx/_static/mono_fonts.png
--------------------------------------------------------------------------------
/sphinx/_static/noto_fonts.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/sphinx/_static/noto_fonts.bmp
--------------------------------------------------------------------------------
/sphinx/_static/noto_fonts.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/sphinx/_static/noto_fonts.png
--------------------------------------------------------------------------------
/sphinx/_static/pinball.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/sphinx/_static/pinball.png
--------------------------------------------------------------------------------
/sphinx/_static/proverbs.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/sphinx/_static/proverbs.bmp
--------------------------------------------------------------------------------
/sphinx/_static/proverbs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/sphinx/_static/proverbs.png
--------------------------------------------------------------------------------
/sphinx/_static/roids.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/sphinx/_static/roids.png
--------------------------------------------------------------------------------
/sphinx/_static/rotations.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/sphinx/_static/rotations.png
--------------------------------------------------------------------------------
/sphinx/_static/scroll.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/sphinx/_static/scroll.png
--------------------------------------------------------------------------------
/sphinx/_static/test.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/sphinx/_static/test.png
--------------------------------------------------------------------------------
/sphinx/_static/tiny_toasters.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/sphinx/_static/tiny_toasters.bmp
--------------------------------------------------------------------------------
/sphinx/_static/tiny_toasters.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/sphinx/_static/tiny_toasters.png
--------------------------------------------------------------------------------
/sphinx/_static/toasters.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/sphinx/_static/toasters.bmp
--------------------------------------------------------------------------------
/sphinx/_static/toasters.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/sphinx/_static/toasters.png
--------------------------------------------------------------------------------
/sphinx/_static/vga1_16x16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/sphinx/_static/vga1_16x16.png
--------------------------------------------------------------------------------
/sphinx/_static/vga1_16x32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/sphinx/_static/vga1_16x32.png
--------------------------------------------------------------------------------
/sphinx/_static/vga1_8x16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/sphinx/_static/vga1_8x16.png
--------------------------------------------------------------------------------
/sphinx/_static/vga1_8x8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/sphinx/_static/vga1_8x8.png
--------------------------------------------------------------------------------
/sphinx/_static/vga1_bold_16x16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/sphinx/_static/vga1_bold_16x16.png
--------------------------------------------------------------------------------
/sphinx/_static/vga1_bold_16x32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/sphinx/_static/vga1_bold_16x32.png
--------------------------------------------------------------------------------
/sphinx/_static/vga2_16x16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/sphinx/_static/vga2_16x16.png
--------------------------------------------------------------------------------
/sphinx/_static/vga2_16x32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/sphinx/_static/vga2_16x32.png
--------------------------------------------------------------------------------
/sphinx/_static/vga2_8x16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/sphinx/_static/vga2_8x16.png
--------------------------------------------------------------------------------
/sphinx/_static/vga2_8x8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/sphinx/_static/vga2_8x8.png
--------------------------------------------------------------------------------
/sphinx/_static/vga2_bold_16x16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/sphinx/_static/vga2_bold_16x16.png
--------------------------------------------------------------------------------
/sphinx/_static/vga2_bold_16x32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/sphinx/_static/vga2_bold_16x32.png
--------------------------------------------------------------------------------
/sphinx/_static/watch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/russhughes/gc9a01_mpy/6ceba791a462bc5764d8340c2af0d0c3f77fb4d3/sphinx/_static/watch.png
--------------------------------------------------------------------------------
/sphinx/building.rst:
--------------------------------------------------------------------------------
1 | Building the firmware
2 | =====================
3 |
4 | See the MicroPython `Getting Started `_
5 | for more detailed information on building the MicroPython firmware.
6 |
7 |
8 | Clone the Repositories
9 | ----------------------
10 |
11 | .. code-block:: console
12 |
13 | $ git clone git@github.com:micropython/micropython.git
14 | $ git clone https://github.com/russhughes/gc9a01_mpy.git
15 |
16 | Compile the cross compiler if you haven't already
17 |
18 | .. code-block:: console
19 |
20 | $ make -C micropython/mpy-cross
21 |
22 | .. _buildingr-micropython-114-thru-119:
23 |
24 | ESP32 MicroPython 1.14 thru 1.19
25 | --------------------------------
26 |
27 | Change to the ESP32 port directory
28 |
29 | .. code-block:: console
30 |
31 | $ cd micropython/ports/esp32
32 |
33 | Compile the module with specified USER_C_MODULES dir
34 |
35 | .. code-block:: console
36 |
37 | $ make USER_C_MODULES=../../../../gc9a01_mpy/src/micropython.cmake all
38 |
39 | Erase the target device if this is the first time uploading this
40 | firmware
41 |
42 | .. code-block:: console
43 |
44 | $ make USER_C_MODULES=../../../../gc9a01_mpy/src/micropython.cmake erase
45 |
46 | Upload the new firmware
47 |
48 | .. code-block:: console
49 |
50 | $ make USER_C_MODULES=../../../../gc9a01_mpy/src/micropython.cmake deploy
51 |
52 | .. _building-micropython-120-and-later:
53 |
54 | ESP32 MicroPython 1.20 and later
55 | --------------------------------
56 |
57 | Change to the ESP32 port directory, and build the firmware
58 |
59 | .. code-block:: console
60 |
61 | $ cd micropython/ports/esp32
62 |
63 | $ make \
64 | BOARD=ESP32_GENERIC \
65 | BOARD_VARIANT=SPIRAM \
66 | USER_C_MODULES=../../../../gc9a01_mpy/src/micropython.cmake \
67 | FROZEN_MANIFEST=../../../../gc9a01_mpy/manifest.py \
68 | clean submodules all
69 |
70 | Erase the flash and deploy on your device
71 |
72 | .. code-block:: console
73 |
74 | $ make \
75 | BOARD=ESP32_GENERIC \
76 | BOARD_VARIANT=SPIRAM \
77 | USER_C_MODULES=../../../../gc9a01_mpy/src/micropython.cmake \
78 | FROZEN_MANIFEST=../../../../gc9a01_mpy/manifest.py \
79 | erase deploy
80 |
81 | RP2040 MicroPython 1.20 and later
82 | ---------------------------------
83 |
84 | Change to the RP2 port directory, and build the firmware
85 |
86 | .. code-block:: console
87 |
88 | $ cd micropython/ports/rp2
89 | $ make \
90 | BOARD=RPI_PICO \
91 | FROZEN_MANIFEST=../../../../gc9a01c/manifest.py \
92 | USER_C_MODULES=../../../gc9a01c/src/micropython.cmake \
93 | submodules clean all
94 |
95 | Flash the firmware.uf2 file from the build-${BOARD} directory to your device.
96 |
--------------------------------------------------------------------------------
/sphinx/configs.rst:
--------------------------------------------------------------------------------
1 | .. _configs:
2 |
3 | .. toctree::
4 | :glob:
5 |
6 | configs/*
7 |
--------------------------------------------------------------------------------
/sphinx/configs/ESP32-S3-LCD-1.28_config.rst:
--------------------------------------------------------------------------------
1 | .. _tft_configs/ESP32-S3-LCD-1.28:
2 |
3 | ESP32-S3-LCD-1.28
4 | =================
5 | https://www.waveshare.com/wiki/ESP32-S3-LCD-1.28
6 | Firmware: ESP32_GENERIC/firmware_16MiB.bin
7 |
8 | tft_configs/ESP32-S3-LCD-1.28/tft_config.py
9 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10 |
11 | .. literalinclude:: ../../tft_configs/ESP32-S3-LCD-1.28/tft_config.py
12 | :language: python
13 | :linenos:
14 | :lines: 1-
15 |
16 |
17 | tft_configs/ESP32-S3-LCD-1.28/tft_buttons.py
18 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
19 |
20 |
21 |
22 | .. literalinclude:: ../../tft_configs/ESP32-S3-LCD-1.28/tft_buttons.py
23 | :language: python
24 | :linenos:
25 | :lines: 1-
26 |
27 |
--------------------------------------------------------------------------------
/sphinx/configs/RP2-Dual-Display_config.rst:
--------------------------------------------------------------------------------
1 | .. _tft_configs/RP2-Dual-Display:
2 |
3 | RP2-Dual-Display
4 | ================
5 |
6 | 240x240 GC9A01 display connected to a Raspberry Pi Pico.
7 |
8 | .. list-table:: **Connections**
9 | :header-rows: 1
10 |
11 | * - Pico Pin
12 | - Display
13 | * - 27 (GP21)
14 | - BL
15 | * - 26 (GP20)
16 | - RST
17 | * - 21 (GP16)
18 | - DC
19 | * - 22 (GP17)
20 | - CS
21 | * - 23 (GND)
22 | - GND
23 | * - 24 (GP18)
24 | - CLK
25 | * - 25 (GP19)
26 | - DIN
27 |
28 | tft_configs/RP2-Dual-Display/tft_config0.py
29 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
30 |
31 | .. literalinclude:: ../../tft_configs/RP2-Dual-Display/tft_config0.py
32 | :language: python
33 | :linenos:
34 | :lines: 1-
35 |
36 |
37 | 240x240 GC9A01 display connected to a Raspberry Pi Pico.
38 |
39 | .. list-table:: **Connections**
40 | :header-rows: 1
41 |
42 | * - Pico Pin
43 | - Display
44 | * - 14 (GP10)
45 | - BL
46 | * - 15 (GP11)
47 | - RST
48 | * - 16 (GP12)
49 | - DC
50 | * - 17 (GP13)
51 | - CS
52 | * - 18 (GND)
53 | - GND
54 | * - 19 (GP14)
55 | - CLK
56 | * - 20 (GP15)
57 | - DIN
58 |
59 | tft_configs/RP2-Dual-Display/tft_config1.py
60 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
61 |
62 | .. literalinclude:: ../../tft_configs/RP2-Dual-Display/tft_config1.py
63 | :language: python
64 | :linenos:
65 | :lines: 1-
66 |
67 |
68 | tft_configs/RP2-Dual-Display/tft_buttons.py
69 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
70 |
71 |
72 |
73 | .. literalinclude:: ../../tft_configs/RP2-Dual-Display/tft_buttons.py
74 | :language: python
75 | :linenos:
76 | :lines: 1-
77 |
78 |
--------------------------------------------------------------------------------
/sphinx/configs/RP2040-Touch-LCD-1.28_config.rst:
--------------------------------------------------------------------------------
1 | .. _tft_configs/RP2040-Touch-LCD-1.28:
2 |
3 | RP2040-Touch-LCD-1.28
4 | =====================
5 |
6 |
7 | tft_configs/RP2040-Touch-LCD-1.28/tft_config.py
8 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9 |
10 | .. literalinclude:: ../../tft_configs/RP2040-Touch-LCD-1.28/tft_config.py
11 | :language: python
12 | :linenos:
13 | :lines: 1-
14 |
15 |
16 | tft_configs/RP2040-Touch-LCD-1.28/tft_buttons.py
17 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
18 |
19 |
20 |
21 | .. literalinclude:: ../../tft_configs/RP2040-Touch-LCD-1.28/tft_buttons.py
22 | :language: python
23 | :linenos:
24 | :lines: 1-
25 |
26 |
--------------------------------------------------------------------------------
/sphinx/configs/RP2_config.rst:
--------------------------------------------------------------------------------
1 | .. _tft_configs/RP2:
2 |
3 | RP2
4 | ===
5 |
6 | Generic display connected to a Raspberry Pi Pico.
7 |
8 | .. list-table:: **Connections**
9 | :header-rows: 1
10 |
11 | * - Pico Pin
12 | - Display
13 | * - 14 (GP10)
14 | - BL
15 | * - 15 (GP11)
16 | - RST
17 | * - 16 (GP12)
18 | - DC
19 | * - 17 (GP13)
20 | - CS
21 | * - 18 (GND)
22 | - GND
23 | * - 19 (GP14)
24 | - CLK
25 | * - 20 (GP15)
26 | - DIN
27 |
28 | tft_configs/RP2/tft_config.py
29 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
30 |
31 | .. literalinclude:: ../../tft_configs/RP2/tft_config.py
32 | :language: python
33 | :linenos:
34 | :lines: 1-
35 |
36 |
37 | tft_configs/RP2/tft_buttons.py
38 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
39 |
40 |
41 |
42 | .. literalinclude:: ../../tft_configs/RP2/tft_buttons.py
43 | :language: python
44 | :linenos:
45 | :lines: 1-
46 |
47 |
--------------------------------------------------------------------------------
/sphinx/examples.rst:
--------------------------------------------------------------------------------
1 | ****************
2 | Example Programs
3 | ****************
4 |
5 |
6 | Configuration modules
7 | =====================
8 |
9 | To run the examples, you need two modules that set up the display and buttons for the example MicroPython programs: **tft_config.py** and **tft_buttons.py**. These modules configure the display and manage button interactions, ensuring compatibility with various processors and displays. The provided modules located in the tft_configs folder are specific to the devices I used during testing; use them as a reference to create configuration modules for your device if it's not one of those included.
10 |
11 |
12 | .. include:: configs.rst
13 |
14 | Examples
15 | ========
16 |
17 | .. toctree::
18 | :maxdepth: 1
19 | :glob:
20 |
21 | examples/*
22 |
--------------------------------------------------------------------------------
/sphinx/examples/alien.rst:
--------------------------------------------------------------------------------
1 | .. _alien:
2 |
3 | alien.py
4 | ========
5 |
6 | .. figure:: /_static/alien.png
7 | :align: center
8 |
9 | Randomly draw a jpg using the fast method on the display.
10 |
11 | The alien.jpg is from the Erik Flowers Weather Icons available from
12 | https://github.com/erikflowers/weather-icons and is licensed under
13 | SIL OFL 1.1
14 |
15 | It was was converted from the wi-alien.svg icon using
16 | ImageMagick's convert utility:
17 |
18 | convert wi-alien.svg -type TrueColor alien.jpg
19 |
20 | .. literalinclude:: ../../examples/jpg/alien.py
21 | :language: python
22 | :linenos:
23 | :lines: 1-
24 |
25 |
--------------------------------------------------------------------------------
/sphinx/examples/arcs.rst:
--------------------------------------------------------------------------------
1 | .. _arcs:
2 |
3 | arcs.py
4 | =======
5 |
6 | .. figure:: /_static/arcs.png
7 | :align: center
8 |
9 | Arcs and Filled Arcs
10 |
11 | Draw Arcs and Filled Arcs on the display.
12 |
13 | .. literalinclude:: ../../examples/arcs.py
14 | :language: python
15 | :linenos:
16 | :lines: 1-
17 |
18 |
--------------------------------------------------------------------------------
/sphinx/examples/bitarray.rst:
--------------------------------------------------------------------------------
1 | .. _bitarray:
2 |
3 | bitarray.py
4 | ===========
5 |
6 | .. figure:: /_static/bitarray.png
7 | :align: center
8 |
9 | An example using map_bitarray_to_rgb565 to draw sprites
10 |
11 | .. literalinclude:: ../../examples/bitarray.py
12 | :language: python
13 | :linenos:
14 | :lines: 1-
15 |
16 |
--------------------------------------------------------------------------------
/sphinx/examples/bluemarble.rst:
--------------------------------------------------------------------------------
1 | .. _bluemarble:
2 |
3 | bluemarble.py
4 | =============
5 |
6 | .. figure:: /_static/bluemarble.png
7 | :align: center
8 |
9 | Draw a full screen bitmap on the display.
10 |
11 | Convert bluemarble.jpg to bitmap module
12 |
13 | .. code-block:: console
14 |
15 | utils/image_converter.py bluemarble.jpg 8 >bluemarble.py
16 |
17 | Since the bitmap is large use mpy-cross to precompile the bluemarble.py module to save memory.
18 |
19 | .. code-block:: console
20 |
21 | mpy-cross bluemarble.py
22 |
23 | Upload the compiled bitmap module `bluemarble.mpy` and example program `pbitmap.py`
24 |
25 | Bluemarble image courtesy of the NASA image and video gallery available at
26 | https://images.nasa.gov/
27 |
28 | .. literalinclude:: ../../examples/pbitmap/bluemarble.py
29 | :language: python
30 | :linenos:
31 | :lines: 1-
32 |
33 |
--------------------------------------------------------------------------------
/sphinx/examples/chango.rst:
--------------------------------------------------------------------------------
1 | .. _chango:
2 |
3 | chango.py
4 | =========
5 |
6 | .. figure:: /_static/chango.png
7 | :align: center
8 |
9 | Test for font2bitmap converter.
10 |
11 | .. literalinclude:: ../../examples/prop_fonts/chango.py
12 | :language: python
13 | :linenos:
14 | :lines: 1-
15 |
16 |
--------------------------------------------------------------------------------
/sphinx/examples/feathers.rst:
--------------------------------------------------------------------------------
1 | .. _feathers:
2 |
3 | feathers.py
4 | ===========
5 |
6 | .. figure:: /_static/feathers.png
7 | :align: center
8 |
9 | Smoothly scroll rainbow-colored mirrored random curves across the display.
10 |
11 | .. literalinclude:: ../../examples/feathers.py
12 | :language: python
13 | :linenos:
14 | :lines: 1-
15 |
16 |
--------------------------------------------------------------------------------
/sphinx/examples/fonts.rst:
--------------------------------------------------------------------------------
1 | .. _fonts:
2 |
3 | fonts.py
4 | ========
5 |
6 | .. figure:: /_static/fonts.png
7 | :align: center
8 |
9 | Pages through all characters of four fonts on the Display.
10 |
11 | .. literalinclude:: ../../examples/fonts.py
12 | :language: python
13 | :linenos:
14 | :lines: 1-
15 |
16 |
--------------------------------------------------------------------------------
/sphinx/examples/hello.rst:
--------------------------------------------------------------------------------
1 | .. _hello:
2 |
3 | hello.py
4 | ========
5 |
6 | .. figure:: /_static/hello.png
7 | :align: center
8 |
9 | Writes "Hello!" in random colors at random locations on the display.
10 |
11 | .. literalinclude:: ../../examples/hello.py
12 | :language: python
13 | :linenos:
14 | :lines: 1-
15 |
16 |
--------------------------------------------------------------------------------
/sphinx/examples/hello_world.rst:
--------------------------------------------------------------------------------
1 | .. _hello_world:
2 |
3 | hello_world.py
4 | ==============
5 |
6 | .. figure:: /_static/hello_world.png
7 | :align: center
8 |
9 | Dual display Hello World example.
10 |
11 | Writes "Hello World" in random colors at random locations split across a pair of GC9A01 displays
12 | connected to a Raspberry Pi Pico.
13 |
14 | .. literalinclude:: ../../examples/hello_world.py
15 | :language: python
16 | :linenos:
17 | :lines: 1-
18 |
19 |
--------------------------------------------------------------------------------
/sphinx/examples/hershey.rst:
--------------------------------------------------------------------------------
1 | .. _hershey:
2 |
3 | hershey.py
4 | ==========
5 | .. figure:: /_static/hershey.png
6 | :align: center
7 |
8 | Hershey vector font demo
9 |
10 | Demo program that draws greetings on display cycling thru hershey fonts and colors.
11 |
12 | .. literalinclude:: ../../examples/hershey.py
13 | :language: python
14 | :linenos:
15 | :lines: 1-
16 |
17 |
--------------------------------------------------------------------------------
/sphinx/examples/jpg_test.rst:
--------------------------------------------------------------------------------
1 | .. _jpg_test:
2 |
3 | jpg_test.py
4 | ===========
5 |
6 | Draw a full screen jpg using the slower but less memory intensive method
7 | of blitting each Minimum Coded Unit (MCU) block. Usually 8x8 pixels but can
8 | be other multiples of 8.
9 |
10 | .. figure:: /_static/bluemarble.png
11 | :align: center
12 |
13 |
14 | bigbuckbunny.jpg (c) copyright 2008, Blender Foundation / www.bigbuckbunny.org
15 |
16 | .. literalinclude:: ../../examples/jpg/jpg_test.py
17 | :language: python
18 | :linenos:
19 | :lines: 1-
20 |
21 |
--------------------------------------------------------------------------------
/sphinx/examples/lines.rst:
--------------------------------------------------------------------------------
1 | .. _lines:
2 |
3 | lines.py
4 | ========
5 | .. figure:: /_static/lines.png
6 | :align: center
7 |
8 | Benchmarks the speed of drawing horizontal and vertical lines on the display.
9 |
10 | .. literalinclude:: ../../examples/lines.py
11 | :language: python
12 | :linenos:
13 | :lines: 1-
14 |
15 |
--------------------------------------------------------------------------------
/sphinx/examples/mono_fonts.rst:
--------------------------------------------------------------------------------
1 | .. _mono_fonts:
2 |
3 | mono_fonts.py
4 | =============
5 |
6 | .. figure:: /_static/mono_fonts.png
7 | :align: center
8 |
9 | Test for write_font_converter.py and bitmap method
10 |
11 | .. literalinclude:: ../../examples/mono_fonts/mono_fonts.py
12 | :language: python
13 | :linenos:
14 | :lines: 1-
15 |
16 |
--------------------------------------------------------------------------------
/sphinx/examples/noto_fonts.rst:
--------------------------------------------------------------------------------
1 | .. _noto_fonts:
2 |
3 | noto_fonts.py
4 | =============
5 |
6 | .. figure:: /_static/noto_fonts.png
7 | :align: center
8 |
9 |
10 | Writes the names of three Noto fonts centered on the display using the font. The fonts were
11 | converted from True Type fonts using the write_font_converter.py utility.
12 |
13 | .. literalinclude:: ../../examples/noto_fonts/noto_fonts.py
14 | :language: python
15 | :linenos:
16 | :lines: 1-
17 |
18 |
--------------------------------------------------------------------------------
/sphinx/examples/pinball.rst:
--------------------------------------------------------------------------------
1 | .. _pinball:
2 |
3 | pinball.py
4 | ==========
5 |
6 | .. figure:: /_static/pinball.png
7 | :align: center
8 |
9 | Minimal pinball game
10 |
11 | Minimal pinball game in MicroPython based on code from Ten Minute Physics Tutorial "How to write a
12 | pinball simulation."
13 |
14 | Tutorial Links:
15 | https://matthias-research.github.io/pages/tenMinutePhysics/
16 | https://youtu.be/NhVUCsXp-Uo
17 |
18 | Gameplay Video:
19 | https://youtu.be/y0B3i_UmEU8
20 |
21 | Requires:
22 | tft_config.py for display configuration. See examples/configs
23 | tft_buttons.py for button configuration. See examples/configs
24 | OR modify the code for your own display and buttons.
25 |
26 | This file incorporates work covered by the following copyright and permission notice.
27 | Modifications and additions Copyright (c) 2022 Russ Hughes and released under the same
28 | terms as the original code.
29 |
30 |
31 | Copyright 2021 Matthias Müller - Ten Minute Physics
32 |
33 | Permission is hereby granted, free of charge, to any person obtaining a copy of
34 | this software and associated documentation files (the "Software"), to deal in
35 | the Software without restriction, including without limitation the rights to
36 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
37 | of the Software, and to permit persons to whom the Software is furnished to do
38 | so, subject to the following conditions:
39 |
40 | The above copyright notice and this permission notice shall be included in all
41 | copies or substantial portions of the Software.
42 |
43 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
44 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
45 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
46 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
47 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
48 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
49 | SOFTWARE.
50 |
51 | .. literalinclude:: ../../examples/pinball.py
52 | :language: python
53 | :linenos:
54 | :lines: 1-
55 |
56 |
--------------------------------------------------------------------------------
/sphinx/examples/proverbs.rst:
--------------------------------------------------------------------------------
1 | .. _proverbs:
2 |
3 | proverbs.py
4 | ===========
5 |
6 | .. figure:: /_static/proverbs.png
7 | :align: center
8 |
9 | Test for TrueType write_font_converter.
10 |
11 | Displays what I hope are chinese proverbs in simplified chinese to test UTF-8 font support.
12 | The fonts were converted from True Type fonts using the
13 | :ref:`write_font_converter.py` utility.
14 |
15 | .. literalinclude:: ../../examples/proverbs/make_proverbs_fonts.sh
16 |
17 |
18 | .. note:: This example requires the following modules:
19 |
20 | .. hlist::
21 | :columns: 3
22 |
23 | - `gc9a01`
24 | - `tft_config`
25 | - `proverbs_20`
26 |
27 | .. literalinclude:: ../../examples/proverbs/proverbs.py
28 | :language: python
29 | :linenos:
30 | :lines: 1-
31 |
32 |
--------------------------------------------------------------------------------
/sphinx/examples/roids.rst:
--------------------------------------------------------------------------------
1 | .. _roids:
2 |
3 | roids.py
4 | ========
5 |
6 | .. figure:: /_static/roids.png
7 | :align: center
8 |
9 | Asteroids style game demo using polygons.
10 |
11 | .. literalinclude:: ../../examples/roids.py
12 | :language: python
13 | :linenos:
14 | :lines: 1-
15 |
16 |
--------------------------------------------------------------------------------
/sphinx/examples/rotations.rst:
--------------------------------------------------------------------------------
1 | .. _rotations:
2 |
3 | rotations.py
4 | ============
5 |
6 | .. figure:: /_static/rotations.png
7 | :align: center
8 |
9 | Shows the effect of each of the 8 rotation values on the display.
10 |
11 | .. literalinclude:: ../../examples/rotations.py
12 | :language: python
13 | :linenos:
14 | :lines: 1-
15 |
16 |
--------------------------------------------------------------------------------
/sphinx/examples/scroll.rst:
--------------------------------------------------------------------------------
1 | .. _scroll:
2 |
3 | scroll.py
4 | =========
5 |
6 | Smoothly scroll all characters of a font up the display.
7 | Fonts heights must be even multiples of the screen height
8 | (i.e. 8 or 16 pixels high).
9 |
10 | .. literalinclude:: ../../examples/scroll.py
11 | :language: python
12 | :linenos:
13 | :lines: 1-
14 |
15 |
--------------------------------------------------------------------------------
/sphinx/examples/tiny_toasters.rst:
--------------------------------------------------------------------------------
1 | .. _tiny_toasters:
2 |
3 | tiny_toasters.py
4 | ================
5 |
6 | .. figure:: /_static/tiny_toasters.png
7 | :align: center
8 |
9 | Test sprites_converter.
10 |
11 | Tiny Flying Toasters for smaller displays using a converted BMP spritesheet module using:
12 |
13 | .. code-block:: console
14 |
15 | `sprites_converter.py ttoasters.bmp 32 32 4 > ttoast_bitmaps.py`
16 |
17 | .. rubric:: The tiny_toasters.py example uses the spritesheet from CircuitPython_Flying_Toasters pendant
18 | project https://learn.adafruit.com/circuitpython-sprite-animation-pendant-mario-clouds-flying-toasters
19 |
20 |
21 | .. note:: This example requires the following modules:
22 |
23 | .. hlist::
24 | :columns: 3
25 |
26 | - `gc9a01`
27 | - `tft_config`
28 | - `tiny_toasters`
29 |
30 | .. literalinclude:: ../../examples/tiny_toasters/tiny_toasters.py
31 | :language: python
32 | :linenos:
33 | :lines: 1-
34 |
35 |
--------------------------------------------------------------------------------
/sphinx/examples/toasters.rst:
--------------------------------------------------------------------------------
1 | .. _toasters:
2 |
3 | toasters.py
4 | ===========
5 |
6 | .. figure:: /_static/toasters.png
7 | :align: center
8 |
9 | An example using bitmap to draw sprites on the display.
10 |
11 | Spritesheet from CircuitPython_Flying_Toasters
12 | https://learn.adafruit.com/circuitpython-sprite-animation-pendant-mario-clouds-flying-toasters
13 |
14 | .. literalinclude:: ../../examples/toasters/toasters.py
15 | :language: python
16 | :linenos:
17 | :lines: 1-
18 |
19 |
--------------------------------------------------------------------------------
/sphinx/examples/watch.rst:
--------------------------------------------------------------------------------
1 | .. _watch:
2 |
3 | watch.py
4 | ========
5 |
6 | .. figure:: /_static/watch.png
7 | :align: center
8 |
9 | Analog Watch Display
10 |
11 | Analog Watch Display using jpg for the face and filled polygons for the hand Requires
12 | face_{width}x{height}.jpg in the same directory as this script. See the create_face.py
13 | script for creating a custom sized face image.
14 |
15 | Previous version video: https://youtu.be/NItKb6umMc4
16 |
17 | .. literalinclude:: ../../examples/watch/watch.py
18 | :language: python
19 | :linenos:
20 | :lines: 1-
21 |
22 |
--------------------------------------------------------------------------------
/sphinx/genindex.rst:
--------------------------------------------------------------------------------
1 | Index
2 | #####
3 |
4 |
--------------------------------------------------------------------------------
/sphinx/index.rst:
--------------------------------------------------------------------------------
1 | .. GC9A01C documentation
2 |
3 | GC9A01C MicroPython driver
4 | ==========================
5 |
6 | .. toctree::
7 | :maxdepth: 3
8 |
9 | self
10 | building
11 | gc9a01
12 | examples
13 | fonts
14 | utils
15 | genindex
16 |
--------------------------------------------------------------------------------
/sphinx/make.bat:
--------------------------------------------------------------------------------
1 | @ECHO OFF
2 |
3 | pushd %~dp0
4 |
5 | REM Command file for Sphinx documentation
6 |
7 | if "%SPHINXBUILD%" == "" (
8 | set SPHINXBUILD=sphinx-build
9 | )
10 | set SOURCEDIR=.
11 | set BUILDDIR=_build
12 |
13 | %SPHINXBUILD% >NUL 2>NUL
14 | if errorlevel 9009 (
15 | echo.
16 | echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
17 | echo.installed, then set the SPHINXBUILD environment variable to point
18 | echo.to the full path of the 'sphinx-build' executable. Alternatively you
19 | echo.may add the Sphinx directory to PATH.
20 | echo.
21 | echo.If you don't have Sphinx installed, grab it from
22 | echo.https://www.sphinx-doc.org/
23 | exit /b 1
24 | )
25 |
26 | if "%1" == "" goto help
27 |
28 | %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
29 | goto end
30 |
31 | :help
32 | %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
33 |
34 | :end
35 | popd
36 |
--------------------------------------------------------------------------------
/sphinx/romfont.py:
--------------------------------------------------------------------------------
1 | """converted from vga_8x8.bin """
2 |
3 | # font width
4 | WIDTH = 8
5 |
6 | # font height
7 | HEIGHT = 8
8 |
9 | # first character in front
10 | FIRST = 0x20
11 |
12 | # last character in font
13 | LAST = 0x7f
14 |
15 | # bitmap of each character from FIRST to LAST
16 | _FONT =\
17 | b'\x00\x00\x00\x00\x00\x00\x00\x00'\
18 | b'\x18\x3c\x3c\x18\x18\x00\x18\x00'\
19 | b'\x66\x66\x24\x00\x00\x00\x00\x00'\
20 |
21 | ... many more lines of data...
22 |
23 | b'\x70\x18\x18\x0e\x18\x18\x70\x00'\
24 | b'\x76\xdc\x00\x00\x00\x00\x00\x00'\
25 | b'\x00\x10\x38\x6c\xc6\xc6\xfe\x00'\
26 |
27 | FONT = memoryview(_FONT)
28 |
--------------------------------------------------------------------------------
/sphinx/truetype.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | # Converted from Chango-Regular.ttf using:
3 | # ./write_font_converter.py Chango-Regular.ttf 16 -c 0x20-0x7f
4 |
5 | # Maps the order of the character data
6 | MAP = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~"
7 |
8 | # Number of color bits per pixel, currently only 1 is used but could be
9 | # increased to support antialiased or smoothed fonts in the future.
10 | BPP = 1
11 |
12 | # Font height
13 | HEIGHT = 17
14 |
15 | # Font max width
16 | MAX_WIDTH = 24
17 |
18 | # one byte per character table of widths in the same order as the MAP string
19 | _WIDTHS = \
20 | b'\x06\x08\x0a\x0e\x0d\x18\x10\x06\x08\x08\x0a\x0d\x06\x08\x06\x0b'\
21 |
22 | ... more lines of data...
23 |
24 | b'\x0d\x0d\x0b\x0a\x0b\x0e\x0c\x12\x0d\x0c\x0b\x09\x06\x09\x0e\x0b'
25 |
26 | # OFFSET_WIDTH bytes per character in the same order as the MAP string
27 | # to the start of each character in bits.
28 | OFFSET_WIDTH = 2
29 | _OFFSETS = \
30 | b'\x00\x00\x00\x66\x00\xee\x01\x98\x02\x86\x03\x63\x04\xfb\x06\x0b'\
31 |
32 | ... more lines of data...
33 |
34 | b'\x49\x94\x4a\x71\x4b\x3d\x4b\xf8\x4c\x91\x4c\xf7\x4d\x90\x4e\x7e'
35 |
36 | # character bitmaps per character in the same order as the MAP string.
37 | # Note: character data may not start on byte boundaries
38 | _BITMAPS =\
39 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x61'\
40 |
41 | ... many more lines of data...
42 |
43 | b'\x3d\xe3\xfc\x00\x00\x00\x00\x00'
44 |
45 | WIDTHS = memoryview(_WIDTHS)
46 | OFFSETS = memoryview(_OFFSETS)
47 | BITMAPS = memoryview(_BITMAPS)
48 |
--------------------------------------------------------------------------------
/sphinx/utils.rst:
--------------------------------------------------------------------------------
1 | Utilities
2 | =========
3 |
4 | .. toctree::
5 | :glob:
6 |
7 | utils/*
8 |
--------------------------------------------------------------------------------
/sphinx/utils/create_png_examples.rst:
--------------------------------------------------------------------------------
1 | .. _create_png_examples:
2 |
3 | create_png_examples.py
4 | ----------------------
5 | Reads all font-bin files from the specified `input` directory and writes png images to t
6 | he specified `output` directory. Optionally limiting the characters included to -first-char
7 | (-f) thru -last-char (-l). This is the program I used to create the png font samples in the
8 | documentation.
9 |
10 | .. seealso::
11 | - :ref:`Bitmap Font Samples`.
12 |
13 | Example
14 | ^^^^^^^
15 |
16 | .. code-block:: console
17 |
18 | - create_png_examples.py font_directory png_directory
19 |
20 | Usage
21 | ^^^^^
22 |
23 | .. code-block:: console
24 |
25 | usage: create_png_examples.py [-h] input output
26 |
27 | Creates png samples of each text font file from the input directoryto the output directory.
28 |
29 | positional arguments:
30 | input input directory containing font-bin files
31 | output output directory to create pngs
32 |
33 | optional arguments:
34 | -h, --help show this help message and exit
35 |
36 |
--------------------------------------------------------------------------------
/sphinx/utils/image_converter.rst:
--------------------------------------------------------------------------------
1 | .. _image_converter:
2 |
3 | image_converter.py
4 | ------------------
5 | Convert an image file to a python module for use with the bitmap method. Use redirection to save the
6 | output to a file. The image is converted to a bitmap using the number of bits per pixel you specify.
7 | The bitmap is saved as a python module that can be imported and used with the bitmap method.
8 |
9 | .. seealso::
10 | - :ref:`alien.py`.
11 |
12 | Example
13 | ^^^^^^^
14 |
15 | .. code-block:: console
16 |
17 | # create python module from cat.png with 4 bits per pixel and save it to cat_bitmap.py.
18 | # Use '-s' to swap the color bytes for the GC9A01 display.
19 |
20 | ./image_converter cat.png 4 -s > cat_bitmap.py
21 |
22 | # cross compile the python module
23 | mpy-cross cat_bitmap.py
24 |
25 | # upload the compiled module to the board
26 | mpremote cp cat_bitmap.mpy :
27 |
28 | The python file can be imported and displayed with the bitmap method. For example:
29 |
30 | .. code-block:: python
31 |
32 | import tft_config
33 | import cat_bitmap
34 | tft = tft_config.config(1)
35 | tft.bitmap(cat_bitmap, 0, 0)
36 |
37 | Usage
38 | ^^^^^
39 |
40 | .. code-block:: console
41 |
42 | usage: image_converter.py [-h] [-s] image_file bits_per_pixel
43 |
44 | Convert image file to python module for use with bitmap method.
45 |
46 | positional arguments:
47 | image_file Name of file containing image to convert
48 | bits_per_pixel The number of bits to use per pixel (1..8)
49 |
50 | optional arguments:
51 | -h, --help show this help message and exit
52 | -s, --swap Swap color565 bytes
53 |
54 |
--------------------------------------------------------------------------------
/sphinx/utils/sprites_converter.rst:
--------------------------------------------------------------------------------
1 | .. _sprites_converter:
2 |
3 | sprites_converter.py
4 | --------------------
5 | Convert a sprite sheet image to python a module for use with indexed bitmap method. The Sprite sheet
6 | width and height should be a multiple of sprite width and height. There should be no extra pixels
7 | between sprites. All sprites will share the same palette.
8 |
9 | .. seealso::
10 | - :ref:`tiny_toasters.py`.
11 |
12 | Example
13 | ^^^^^^^
14 |
15 | .. code-block:: console
16 |
17 | # create a sprite sheet with 7 colored sprites 32x32 pixels each
18 | ./make_colorbars_bitmap.py 227 32 3 --png sprites.png
19 |
20 | # convert the sprite sheet to a python module with 7 sprites
21 | ./sprites_converter.py sprites.png 32 32 4 > sprites.py
22 |
23 | .. code-block:: python
24 |
25 | import tft_config
26 | import sprites
27 | tft = tft_config.config(1)
28 | for i in range(sprites.BITMAPS):
29 | tft.bitmap(sprites, 0, 0, i)
30 |
31 | Usage
32 | ^^^^^
33 |
34 | .. code-block:: console
35 |
36 | usage: sprites_converter.py [-h] [-s] image_file sprite_width sprite_height bits_per_pixel
37 |
38 | Convert image file to python module for use with bitmap method.
39 |
40 | positional arguments:
41 | image_file Name of file containing image to convert
42 | sprite_width Width of sprites in pixels
43 | sprite_height Height of sprites in pixels
44 | bits_per_pixel The number of bits to use per pixel (1..8)
45 |
46 | optional arguments:
47 | -h, --help show this help message and exit
48 | -s, --swap Swap color565 bytes
49 |
50 |
--------------------------------------------------------------------------------
/sphinx/utils/text_font_converter.rst:
--------------------------------------------------------------------------------
1 | .. _text_font_converter:
2 |
3 | text_font_converter.py
4 | ----------------------
5 | Convert fonts from the font-bin directory of spacerace's https://github.com/spacerace/romfont
6 | VGA and BIOS rom font repo. Optionally limiting the characters included to -first-char (-f) thru
7 | -last-char (-l).
8 |
9 | Input can be a file or a directory containing multiple font files. If input is a directory, output
10 | must also be a directory. If input is a file, output can be a file or a directory.
11 |
12 | .. seealso::
13 | - :ref:`fonts.py`.
14 | - :ref:`hello.py`.
15 | - :ref:`rotations.py`.
16 | - :ref:`scroll.py`.
17 | - :ref:`tiny_toasters.py`.
18 |
19 | Example
20 | ^^^^^^^
21 |
22 | .. code-block:: console
23 |
24 | # convert the IBM_VGA_8x8.bin font to a python module with 8x8 characters
25 | text_font_converter.py romfont/font-bin/IBM_VGA_8x8.bin vga_8x8.py -f 32 -l 127
26 |
27 | .. code-block:: python
28 |
29 | import tft_config
30 | import vga_8x8
31 | tft = tft_config.config(1)
32 | tft.bitmap(vga_8x8, "Hello World!", 0, 0)
33 |
34 | Usage
35 | ^^^^^
36 |
37 | .. code-block:: console
38 |
39 | usage: text_font_converter.py [-h] [-f FIRST_CHAR] [-l LAST_CHAR] input output
40 |
41 | Convert romfont.bin file or directory to python module(s).
42 |
43 | positional arguments:
44 | input file or directory containing binary font file(s).
45 | output file or directory to contain python font file(s).
46 |
47 | optional arguments:
48 | -h, --help show this help message and exit
49 | -f FIRST_CHAR, --first-char FIRST_CHAR
50 | The first character code to include in the conversion (default: 0x20).
51 | -l LAST_CHAR, --last-char LAST_CHAR
52 | The last character code to include in the conversion (default: 0x7F).
53 |
54 |
--------------------------------------------------------------------------------
/sphinx/utils/write_font_converter.rst:
--------------------------------------------------------------------------------
1 | .. _write_font_converter:
2 |
3 | write_font_converter.py
4 | -----------------------
5 | Convert characters from a truetype font to a python bitmap for use with the bitmap or write method.
6 | The chango, noto_fonts and proverbs examples use converted TrueType fonts.
7 |
8 | .. seealso::
9 | - :ref:`chango.py`.
10 | - :ref:`noto_fonts.py`.
11 | - :ref:`proverbs.py`.
12 |
13 | Example
14 | ^^^^^^^
15 |
16 | .. code-block:: console
17 |
18 | # convert the Chango-Regular.ttf to a python bitmap module with approximately 32 pixel high characters
19 | ./write_font_converter.py Chango-Regular.ttf 32 -c 0x20-0x7f > chango_32.py
20 |
21 | .. code-block:: python
22 |
23 | import tft_config
24 | import chango_32
25 | tft = tft_config.config(1)
26 | tft.write(chango_32, "Hello World!", 0, 0)
27 |
28 | Usage
29 | ^^^^^
30 |
31 | .. code-block:: console
32 |
33 | usage: write_font_converter.py [-h] [-width FONT_WIDTH] (-c CHARACTERS | -s STRING) font_file font_height
34 |
35 | Convert characters from a truetype font to a python bitmap for use with the bitmap method in the st7789 and ili9342 drivers.
36 |
37 | positional arguments:
38 | font_file name of font file to convert.
39 | font_height size of font to create bitmaps from.
40 |
41 | optional arguments:
42 | -h, --help show this help message and exit
43 | -width FONT_WIDTH, --font_width FONT_WIDTH
44 | width of font to create bitmaps from.
45 |
46 | character selection:
47 | characters from the font to include in the bitmap.
48 |
49 | -c CHARACTERS, --characters CHARACTERS
50 | integer or hex character values and/or ranges to include. For example: "65, 66, 67" or "32-127" or "0x30-0x39,
51 | 0x41-0x5a"
52 | -s STRING, --string STRING
53 | string of characters to include For example: "1234567890-."
54 |
55 |
--------------------------------------------------------------------------------
/src/.clang-format:
--------------------------------------------------------------------------------
1 | ---
2 | # BasedOnStyle: LLVM
3 | AccessModifierOffset: -2
4 | ConstructorInitializerIndentWidth: 4
5 | AlignEscapedNewlinesLeft: false
6 | AlignTrailingComments: true
7 | AllowAllParametersOfDeclarationOnNextLine: true
8 | AllowShortIfStatementsOnASingleLine: false
9 | AllowShortLoopsOnASingleLine: false
10 | AlwaysBreakTemplateDeclarations: false
11 | AlwaysBreakBeforeMultilineStrings: false
12 | BreakBeforeBinaryOperators: false
13 | BreakBeforeTernaryOperators: true
14 | BreakConstructorInitializersBeforeComma: false
15 | BinPackParameters: true
16 | ColumnLimit: 0
17 | ConstructorInitializerAllOnOneLineOrOnePerLine: false
18 | DerivePointerBinding: false
19 | ExperimentalAutoDetectBinPacking: false
20 | IndentCaseLabels: true
21 | MaxEmptyLinesToKeep: 1
22 | NamespaceIndentation: None
23 | ObjCSpaceBeforeProtocolList: true
24 | PenaltyBreakBeforeFirstCallParameter: 19
25 | PenaltyBreakComment: 60
26 | PenaltyBreakString: 1000
27 | PenaltyBreakFirstLessLess: 120
28 | PenaltyExcessCharacter: 1000000
29 | PenaltyReturnTypeOnItsOwnLine: 60
30 | PointerBindsToType: false
31 | SpacesBeforeTrailingComments: 1
32 | Cpp11BracedListStyle: true
33 | Standard: Cpp03
34 | IndentWidth: 4
35 | TabWidth: 4
36 | UseTab: Always
37 | BreakBeforeBraces: BS_WebKit
38 | IndentFunctionDeclarationAfterType: false
39 | SpacesInParentheses: false
40 | SpacesInAngles: false
41 | SpaceInEmptyParentheses: false
42 | SpacesInCStyleCastParentheses: false
43 | SpaceAfterControlStatementKeyword: true
44 | SpaceBeforeAssignmentOperators: true
45 | ContinuationIndentWidth: 4
46 | IndentWrappedFunctionNames: true
47 | KeepEmptyLinesAtTheStartOfBlocks: false
48 | SortIncludes: false
49 | SpaceAfterCStyleCast: true
50 | SpacesInSquareBrackets: false
51 | AlignConsecutiveAssignments: true
52 | AlignConsecutiveDeclarations: true
53 | ...
54 |
55 |
--------------------------------------------------------------------------------
/src/gc9a01.h:
--------------------------------------------------------------------------------
1 | #ifndef __GC9A01_H__
2 | #define __GC9A01_H__
3 |
4 | #ifdef __cplusplus
5 | extern "C" {
6 | #endif
7 |
8 |
9 | // color modes
10 | #define COLOR_MODE_65K 0x50
11 | #define COLOR_MODE_262K 0x60
12 | #define COLOR_MODE_12BIT 0x03
13 | #define COLOR_MODE_16BIT 0x05
14 | #define COLOR_MODE_18BIT 0x06
15 | #define COLOR_MODE_16M 0x07
16 |
17 | // commands
18 | #define GC9A01_NOP 0x00
19 | #define GC9A01_SWRESET 0x01
20 | #define GC9A01_RDDID 0x04
21 | #define GC9A01_RDDST 0x09
22 |
23 | #define GC9A01_SLPIN 0x10
24 | #define GC9A01_SLPOUT 0x11
25 | #define GC9A01_PTLON 0x12
26 | #define GC9A01_NORON 0x13
27 |
28 | #define GC9A01_INVOFF 0x20
29 | #define GC9A01_INVON 0x21
30 | #define GC9A01_DISPOFF 0x28
31 | #define GC9A01_DISPON 0x29
32 | #define GC9A01_CASET 0x2A
33 | #define GC9A01_RASET 0x2B
34 | #define GC9A01_RAMWR 0x2C
35 | #define GC9A01_RAMRD 0x2E
36 |
37 | #define GC9A01_PTLAR 0x30
38 | #define GC9A01_VSCRDEF 0x33
39 | #define GC9A01_COLMOD 0x3A
40 | #define GC9A01_MADCTL 0x36
41 | #define GC9A01_VSCSAD 0x37
42 |
43 | #define GC9A01_MADCTL_MY 0x80 // Page Address Order
44 | #define GC9A01_MADCTL_MX 0x40 // Column Address Order
45 | #define GC9A01_MADCTL_MV 0x20 // Page/Column Order
46 | #define GC9A01_MADCTL_ML 0x10 // Line Address Order
47 | #define GC9A01_MADCTL_MH 0x04 // Display Data Latch Order
48 | #define GC9A01_MADCTL_RGB 0x00
49 | #define GC9A01_MADCTL_BGR 0x08
50 |
51 | #define GC9A01_RDID1 0xDA
52 | #define GC9A01_RDID2 0xDB
53 | #define GC9A01_RDID3 0xDC
54 | #define GC9A01_RDID4 0xDD
55 |
56 | // Color definitions
57 | #define BLACK 0x0000
58 | #define BLUE 0x001F
59 | #define RED 0xF800
60 | #define GREEN 0x07E0
61 | #define CYAN 0x07FF
62 | #define MAGENTA 0xF81F
63 | #define YELLOW 0xFFE0
64 | #define WHITE 0xFFFF
65 |
66 | #define OPTIONS_WRAP_V 0x01
67 | #define OPTIONS_WRAP_H 0x02
68 | #define OPTIONS_WRAP 0x03
69 |
70 | #ifdef __cplusplus
71 | }
72 | #endif /* __cplusplus */
73 |
74 | #endif /* __GC9A01_H__ */
75 |
--------------------------------------------------------------------------------
/src/micropython.cmake:
--------------------------------------------------------------------------------
1 | # Create an INTERFACE library for our C module.
2 | add_library(usermod_gc9a01 INTERFACE)
3 |
4 | # Add our source files to the lib
5 | target_sources(usermod_gc9a01 INTERFACE
6 | ${CMAKE_CURRENT_LIST_DIR}/gc9a01.c
7 | ${CMAKE_CURRENT_LIST_DIR}/mpfile.c
8 | ${CMAKE_CURRENT_LIST_DIR}/tjpgd565.c
9 | )
10 |
11 | # Add the current directory as an include directory.
12 | target_include_directories(usermod_gc9a01 INTERFACE
13 | ${CMAKE_CURRENT_LIST_DIR}
14 |
15 | )
16 | target_compile_definitions(usermod_gc9a01 INTERFACE
17 | MODULE_GC9A01_ENABLED=1
18 | )
19 |
20 | # Link our INTERFACE library to the usermod target.
21 | target_link_libraries(usermod INTERFACE usermod_gc9a01)
22 |
--------------------------------------------------------------------------------
/src/micropython.mk:
--------------------------------------------------------------------------------
1 | GC9A01_MOD_DIR := $(USERMOD_DIR)
2 | SRC_USERMOD += $(addprefix $(GC9A01_MOD_DIR)/, gc9a01.c)
3 | SRC_USERMOD += $(addprefix $(GC9A01_MOD_DIR)/, mpfile.c)
4 | SRC_USERMOD += $(addprefix $(GC9A01_MOD_DIR)/, tjpgd565.c)
5 |
6 | CFLAGS_USERMOD += -I$(GC9A01_MOD_DIR) -DMODULE_GC9A01_ENABLED=1 -DMICROPY_PY_FILE_LIKE=1
7 | CFLAGS_USERMOD += -DEXPOSE_EXTRA_METHODS=1
8 |
--------------------------------------------------------------------------------
/src/mpfile.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the Micro Python project, http://micropython.org/
3 | *
4 | * The MIT License (MIT)
5 | *
6 | * Copyright (c) 2016 Dave Hylands
7 | *
8 | * Permission is hereby granted, free of charge, to any person obtaining a copy
9 | * of this software and associated documentation files (the "Software"), to deal
10 | * in the Software without restriction, including without limitation the rights
11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12 | * copies of the Software, and to permit persons to whom the Software is
13 | * furnished to do so, subject to the following conditions:
14 | *
15 | * The above copyright notice and this permission notice shall be included in
16 | * all copies or substantial portions of the Software.
17 | *
18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24 | * THE SOFTWARE.
25 | */
26 |
27 | #ifndef __MPFILE_H__
28 | #define __MPFILE_H__
29 |
30 | #include "py/obj.h"
31 | #include // for off_t
32 |
33 | // A C API for performing I/O on files or file-like objects.
34 |
35 | typedef struct {
36 | mp_obj_base_t base;
37 | mp_obj_t file_obj;
38 | mp_obj_t readinto_fn;
39 | mp_obj_t seek_fn;
40 | mp_obj_t tell_fn;
41 | } mp_file_t;
42 |
43 | #define MP_SEEK_SET 0
44 | #define MP_SEEK_CUR 1
45 | #define MP_SEEK_END 2
46 |
47 | mp_file_t *mp_file_from_file_obj(mp_obj_t file_obj);
48 | mp_file_t *mp_open(const char *filename, const char *mode);
49 | mp_int_t mp_readinto(mp_file_t *file, void *buf, size_t num_bytes);
50 | off_t mp_seek(mp_file_t *file, off_t offset, int whence);
51 | off_t mp_tell(mp_file_t *file);
52 | void mp_close(mp_file_t *file);
53 |
54 |
55 | #endif // __MICROPY_INCLUDED_PY_MPFILE_H__
56 |
--------------------------------------------------------------------------------
/src/tjpgd565.h:
--------------------------------------------------------------------------------
1 | /*----------------------------------------------------------------------------/
2 | / TJpgDec - Tiny JPEG Decompressor include file (C)ChaN, 2020
3 | /----------------------------------------------------------------------------*/
4 | #ifndef DEF_TJPGDEC
5 | #define DEF_TJPGDEC
6 | /*---------------------------------------------------------------------------*/
7 | /* System Configurations */
8 |
9 | #define JD_SZBUF 512 /* Size of stream input buffer */
10 | #define JD_FORMAT 1 /* Output pixel format 0:RGB888 (3 BYTE/pix), 1:RGB565 (1 WORD/pix) */
11 | #define JD_USE_SCALE 1 /* Use descaling feature for output */
12 | #define JD_TBLCLIP 1 /* Use table for saturation (might be a bit faster but increases 1K bytes of code size) */
13 |
14 | /*---------------------------------------------------------------------------*/
15 |
16 | #ifdef __cplusplus
17 | extern "C" {
18 | #endif
19 |
20 | #include "stdint.h"
21 |
22 | /* Error code */
23 | typedef enum {
24 | JDR_OK = 0, /* 0: Succeeded */
25 | JDR_INTR, /* 1: Interrupted by output function */
26 | JDR_INP, /* 2: Device error or wrong termination of input stream */
27 | JDR_MEM1, /* 3: Insufficient memory pool for the image */
28 | JDR_MEM2, /* 4: Insufficient stream input buffer */
29 | JDR_PAR, /* 5: Parameter error */
30 | JDR_FMT1, /* 6: Data format error (may be damaged data) */
31 | JDR_FMT2, /* 7: Right format but not supported */
32 | JDR_FMT3 /* 8: Not supported JPEG standard */
33 | } JRESULT;
34 |
35 |
36 | /* Rectangular structure */
37 | typedef struct {
38 | uint16_t left, right, top, bottom;
39 | } JRECT;
40 |
41 |
42 | /* Decompressor object structure */
43 | typedef struct JDEC JDEC;
44 | struct JDEC {
45 | unsigned int dctr; /* Number of bytes available in the input buffer */
46 | uint8_t* dptr; /* Current data read ptr */
47 | uint8_t* inbuf; /* Bit stream input buffer */
48 | uint8_t dmsk; /* Current bit in the current read byte */
49 | uint8_t scale; /* Output scaling ratio */
50 | uint8_t msx, msy; /* MCU size in unit of block (width, height) */
51 | uint8_t qtid[3]; /* Quantization table ID of each component */
52 | int16_t dcv[3]; /* Previous DC element of each component */
53 | uint16_t nrst; /* Restart interval */
54 | uint16_t width, height; /* Size of the input image (pixel) */
55 | uint8_t* huffbits[2][2]; /* Huffman bit distribution tables [id][dcac] */
56 | uint16_t* huffcode[2][2]; /* Huffman code word tables [id][dcac] */
57 | uint8_t* huffdata[2][2]; /* Huffman decoded data tables [id][dcac] */
58 | int32_t* qttbl[4]; /* Dequantizer tables [id] */
59 | void* workbuf; /* Working buffer for IDCT and RGB output */
60 | uint8_t* mcubuf; /* Working buffer for the MCU */
61 | void* pool; /* Pointer to available memory pool */
62 | unsigned int sz_pool; /* Size of memory pool (bytes available) */
63 | unsigned int (*infunc)(JDEC*, uint8_t*, unsigned int); /* Pointer to jpeg stream input function */
64 | void* device; /* Pointer to I/O device identifier for the session */
65 | uint16_t x_offs; /* x offset for slow method */
66 | uint16_t y_offs; /* y offset for slow method */
67 | };
68 |
69 |
70 | /* TJpgDec API functions */
71 | JRESULT jd_prepare (JDEC* jd, unsigned int (*infunc)(JDEC*,uint8_t*,unsigned int), void* pool, unsigned int sz_pool, void* dev);
72 | JRESULT jd_decomp (JDEC* jd, int (*outfunc)(JDEC*,void*,JRECT*), uint8_t scale);
73 |
74 |
75 | #ifdef __cplusplus
76 | }
77 | #endif
78 |
79 | #endif /* _TJPGDEC */
80 |
--------------------------------------------------------------------------------
/tft_configs/ESP32-S3-LCD-1.28/tft_buttons.py:
--------------------------------------------------------------------------------
1 | # input pins for ESP32-S3-LCD-1.28
2 |
3 | from machine import Pin
4 |
5 | class Buttons():
6 | def __init__(self):
7 | self.name = "ESP32-S3-LCD-1.28"
8 | self.left = Pin(0, Pin.IN)
9 | self.right = Pin(35, Pin.IN)
10 |
--------------------------------------------------------------------------------
/tft_configs/ESP32-S3-LCD-1.28/tft_config.py:
--------------------------------------------------------------------------------
1 | """ESP32-S3-LCD-1.28
2 | https://www.waveshare.com/wiki/ESP32-S3-LCD-1.28
3 | Firmware: ESP32_GENERIC/firmware_16MiB.bin
4 | """
5 |
6 | from machine import Pin, SPI
7 | import gc9a01
8 |
9 | TFA = 0
10 | BFA = 0
11 | WIDE = 0
12 | TALL = 1
13 |
14 | def config(rotation=0, buffer_size=0, options=0):
15 | spi = SPI(1, baudrate=60000000, sck=Pin(10), mosi=Pin(11))
16 |
17 | return gc9a01.GC9A01(
18 | spi,
19 | 240,
20 | 240,
21 | reset=Pin(12, Pin.OUT),
22 | cs=Pin(9, Pin.OUT),
23 | dc=Pin(8, Pin.OUT),
24 | backlight=Pin(40, Pin.OUT),
25 | rotation=rotation,
26 | options=options,
27 | buffer_size= buffer_size)
28 |
--------------------------------------------------------------------------------
/tft_configs/README.md:
--------------------------------------------------------------------------------
1 | # Configs
2 |
3 | You need two modules that set up the display and buttons for the example MicroPython programs: tft_config.py and tft_buttons.py. These modules configure the display and manage button interactions, ensuring compatibility with various processors and displays. The provided modules are specific to the devices I used during testing; use them as a reference to create configuration modules for your device if it's not one of those included.
4 |
--------------------------------------------------------------------------------
/tft_configs/RP2-Dual-Display/tft_buttons.py:
--------------------------------------------------------------------------------
1 | """Dual Display RP2040 Buttons
2 | """
3 |
4 | from machine import Pin
5 |
6 |
7 | class Buttons:
8 | """Buttons class."""
9 |
10 | def __init__(self):
11 | self.name = "RP2040-Touch-LCD-1.28"
12 | self.left = 0
13 | self.right = 0
14 | self.hyper = 0
15 | self.thrust = 0
16 | self.fire = 0
17 |
--------------------------------------------------------------------------------
/tft_configs/RP2-Dual-Display/tft_config0.py:
--------------------------------------------------------------------------------
1 | """tft0 of dual 240x240 GC9A01
2 |
3 | 240x240 GC9A01 display connected to a Raspberry Pi Pico.
4 |
5 | .. list-table:: **Connections**
6 | :header-rows: 1
7 |
8 | * - Pico Pin
9 | - Display
10 | * - 27 (GP21)
11 | - BL
12 | * - 26 (GP20)
13 | - RST
14 | * - 21 (GP16)
15 | - DC
16 | * - 22 (GP17)
17 | - CS
18 | * - 23 (GND)
19 | - GND
20 | * - 24 (GP18)
21 | - CLK
22 | * - 25 (GP19)
23 | - DIN
24 | """
25 |
26 | from machine import Pin, SPI
27 | import gc9a01
28 |
29 | TFA = 0
30 | BFA = 0
31 | WIDE = 1
32 | TALL = 0
33 |
34 |
35 | def config(rotation=0, buffer_size=0, options=0):
36 | """Configure the display and return an instance of gc9a01.GC9A01."""
37 | spi0 = SPI(0, baudrate=60000000, sck=Pin(18), mosi=Pin(19))
38 | tft0 = gc9a01.GC9A01(
39 | spi0,
40 | 240,
41 | 240,
42 | reset=Pin(20, Pin.OUT),
43 | cs=Pin(17, Pin.OUT),
44 | dc=Pin(16, Pin.OUT),
45 | backlight=Pin(21, Pin.OUT),
46 | rotation=rotation,
47 | options=options,
48 | buffer_size=buffer_size,
49 | )
50 |
--------------------------------------------------------------------------------
/tft_configs/RP2-Dual-Display/tft_config1.py:
--------------------------------------------------------------------------------
1 | """tft1 of dual 240x240 GC9A01
2 |
3 | 240x240 GC9A01 display connected to a Raspberry Pi Pico.
4 |
5 | .. list-table:: **Connections**
6 | :header-rows: 1
7 |
8 | * - Pico Pin
9 | - Display
10 | * - 14 (GP10)
11 | - BL
12 | * - 15 (GP11)
13 | - RST
14 | * - 16 (GP12)
15 | - DC
16 | * - 17 (GP13)
17 | - CS
18 | * - 18 (GND)
19 | - GND
20 | * - 19 (GP14)
21 | - CLK
22 | * - 20 (GP15)
23 | - DIN
24 | """
25 |
26 | from machine import Pin, SPI
27 | import gc9a01
28 |
29 | TFA = 0
30 | BFA = 0
31 | WIDE = 1
32 | TALL = 0
33 |
34 |
35 | def config(rotation=0, buffer_size=0, options=0):
36 | """Configure the display and return an instance of gc9a01.GC9A01."""
37 | spi1 = SPI(1, baudrate=60000000, sck=Pin(14), mosi=Pin(15))
38 | tft1 = gc9a01.GC9A01(
39 | spi1,
40 | 240,
41 | 240,
42 | reset=Pin(11, Pin.OUT),
43 | cs=Pin(13, Pin.OUT),
44 | dc=Pin(12, Pin.OUT),
45 | backlight=Pin(10, Pin.OUT),
46 | rotation=rotation,
47 | options=options,
48 | buffer_size=buffer_size,
49 | )
50 |
--------------------------------------------------------------------------------
/tft_configs/RP2/tft_buttons.py:
--------------------------------------------------------------------------------
1 | """Generic RP2040 Buttons
2 | """
3 |
4 | from machine import Pin
5 |
6 |
7 | class Buttons:
8 | """Buttons class."""
9 |
10 | def __init__(self):
11 | self.name = "RP2040-Touch-LCD-1.28"
12 | self.left = 0
13 | self.right = 0
14 | self.hyper = 0
15 | self.thrust = 0
16 | self.fire = 0
17 |
--------------------------------------------------------------------------------
/tft_configs/RP2/tft_config.py:
--------------------------------------------------------------------------------
1 | """Generic 240x240 GC9A01
2 |
3 | Generic display connected to a Raspberry Pi Pico.
4 |
5 | .. list-table:: **Connections**
6 | :header-rows: 1
7 |
8 | * - Pico Pin
9 | - Display
10 | * - 14 (GP10)
11 | - BL
12 | * - 15 (GP11)
13 | - RST
14 | * - 16 (GP12)
15 | - DC
16 | * - 17 (GP13)
17 | - CS
18 | * - 18 (GND)
19 | - GND
20 | * - 19 (GP14)
21 | - CLK
22 | * - 20 (GP15)
23 | - DIN
24 |
25 | """
26 |
27 | from machine import Pin, SPI
28 | import gc9a01
29 |
30 | TFA = 0
31 | BFA = 0
32 | WIDE = 1
33 | TALL = 0
34 |
35 |
36 | def config(rotation=0, buffer_size=0, options=0):
37 | """Configure the display and return an instance of gc9a01.GC9A01."""
38 |
39 | spi = SPI(1, baudrate=60000000, sck=Pin(14), mosi=Pin(15))
40 | return gc9a01.GC9A01(
41 | spi,
42 | 240,
43 | 240,
44 | reset=Pin(11, Pin.OUT),
45 | cs=Pin(13, Pin.OUT),
46 | dc=Pin(12, Pin.OUT),
47 | backlight=Pin(10, Pin.OUT),
48 | rotation=rotation,
49 | options=options,
50 | buffer_size=buffer_size,
51 | )
52 |
--------------------------------------------------------------------------------
/tft_configs/RP2040-Touch-LCD-1.28/tft_buttons.py:
--------------------------------------------------------------------------------
1 | """RP2040-Touch-LCD-1.28
2 | """
3 |
4 | from machine import Pin
5 |
6 |
7 | class Buttons:
8 | """Buttons class."""
9 |
10 | def __init__(self):
11 | self.name = "RP2040-Touch-LCD-1.28"
12 | self.left = 0
13 | self.right = 0
14 | self.hyper = 0
15 | self.thrust = 0
16 | self.fire = 0
17 |
--------------------------------------------------------------------------------
/tft_configs/RP2040-Touch-LCD-1.28/tft_config.py:
--------------------------------------------------------------------------------
1 | """RP2040-Touch-LCD-1.28
2 | """
3 |
4 | from machine import Pin, SPI
5 | import gc9a01
6 |
7 | TFA = 0
8 | BFA = 0
9 | WIDE = 0
10 | TALL = 1
11 |
12 |
13 | def config(rotation=0, buffer_size=0, options=0):
14 | """Configure the display and return an instance of gc9a01.GC9A01."""
15 |
16 | spi = SPI(1, baudrate=60000000, sck=Pin(10), mosi=Pin(11))
17 | return gc9a01.GC9A01(
18 | spi,
19 | 240,
20 | 240,
21 | reset=Pin(13, Pin.OUT),
22 | cs=Pin(9, Pin.OUT),
23 | dc=Pin(8, Pin.OUT),
24 | backlight=Pin(25, Pin.OUT),
25 | rotation=rotation,
26 | options=options,
27 | buffer_size=buffer_size
28 | )
29 |
--------------------------------------------------------------------------------
/utils/howto-convert-jpgs.md:
--------------------------------------------------------------------------------
1 |
2 | You can convert images to compatible jpg's by using ImageMagick's convert
3 | utility by specifying the output type as TrueColor. ImageMagick downloads
4 | are available from https://imagemagick.org/ for Linux, OSX, Windows and
5 | other operating systems.
6 |
7 | The wi-alien.svg icon is from https://github.com/erikflowers/weather-icons
8 | licensed under SIL OFL 1.1
9 |
10 | ```
11 | convert wi-alien.svg -type TrueColor alien.jpg
12 | ```
--------------------------------------------------------------------------------
/utils/requirements.txt:
--------------------------------------------------------------------------------
1 | Pillow==8.1.2
2 | pypng==0.0.20
3 | freetype-py==2.2.0
--------------------------------------------------------------------------------