All Projects → todbot → CircuitPython_GC9A01_demos

todbot / CircuitPython_GC9A01_demos

Licence: MIT license
Demos showing how to use CircuitPython displayio driver for GC9A01 round LCDs

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to CircuitPython GC9A01 demos

usbhostcopro
USB Host Co-processor
Stars: ✭ 54 (+200%)
Mutual labels:  circuitpython
Adafruit CircuitPython SD
SD card drivers for Adafruit CircuitPython
Stars: ✭ 24 (+33.33%)
Mutual labels:  circuitpython
awesome-micropythons
The many forks & ports of MicroPython
Stars: ✭ 35 (+94.44%)
Mutual labels:  circuitpython
awesome-macropad
A curated list of awesome applications, macros, 3d printed cases, guides, and more for the Adafruit CircuitPython rp2040 Macropad.
Stars: ✭ 26 (+44.44%)
Mutual labels:  circuitpython
Big Honking Button
A simple Eurorack sampler and performance module in a silly package.
Stars: ✭ 45 (+150%)
Mutual labels:  circuitpython
microS2
microS2 - An esp32-s2 based development board 🚀
Stars: ✭ 18 (+0%)
Mutual labels:  circuitpython
Adafruit CircuitPython CharLCD
Library code for character LCD interfacing
Stars: ✭ 54 (+200%)
Mutual labels:  circuitpython
CapableRobot USBHub Driver
www.crowdsupply.com/capable-robot-components/programmable-usb-hub
Stars: ✭ 17 (-5.56%)
Mutual labels:  circuitpython
kerntroller
No description or website provided.
Stars: ✭ 31 (+72.22%)
Mutual labels:  circuitpython
micropython-adafruit-mqtt-esp8266
Using MQTT to Publish/Subscribe to adafruit io. MicroPython/CircuitPython implementation on ESP8266/ESP32
Stars: ✭ 53 (+194.44%)
Mutual labels:  circuitpython
CircuitPython-online-IDE
CircuitPython online IDE
Stars: ✭ 15 (-16.67%)
Mutual labels:  circuitpython
Env-KB
A custom mechanical keyboard inspired by the CFTKB Mysterium utilizing the Raspberry Pi Pico
Stars: ✭ 203 (+1027.78%)
Mutual labels:  circuitpython
Adafruit CircuitPython AMG88xx
circuit python driver from AMG88xx GRID-EYE 8x8 IR sensor
Stars: ✭ 33 (+83.33%)
Mutual labels:  circuitpython
PyDOS
DOS-like OS for microcontroller boards running Micropython or Circuitpython
Stars: ✭ 40 (+122.22%)
Mutual labels:  circuitpython
CircuitPython nRF24L01
CircuitPython driver library for the nRF24L01 transceiver.
Stars: ✭ 25 (+38.89%)
Mutual labels:  circuitpython
lightroom-macro-pad
Lightroom Macro Pad With CircuitPython Boards
Stars: ✭ 33 (+83.33%)
Mutual labels:  circuitpython
Adafruit CircuitPython MiniMQTT
MQTT Client Library for CircuitPython
Stars: ✭ 51 (+183.33%)
Mutual labels:  circuitpython
circuitpython
CircuitPython - a Python implementation for teaching coding with microcontrollers
Stars: ✭ 3,097 (+17105.56%)
Mutual labels:  circuitpython
qtpy-knob
QT Py Media Knob using rotary encoder & neopixel ring
Stars: ✭ 49 (+172.22%)
Mutual labels:  circuitpython
Adafruit CircuitPython BNO055
CircuitPython driver for BNO055 absolute orientation sensor
Stars: ✭ 70 (+288.89%)
Mutual labels:  circuitpython

CircuitPython GC9A01 demos

Demos showing how to use CircuitPython displayio driver for GC9A01-based round LCDs. This driver is available in the CircuitPython Community Bundle, or you can install it by hand by copying the gc9a01.py file to your CIRCUITPY/lib directory, or use circup install gc9a01.

Usage

import board
import displayio
import gc9a01
# Raspberry Pi Pico pinout, one possibility, at "southwest" of board
tft_clk = board.GP10 # must be a SPI CLK
tft_mosi= board.GP11 # must be a SPI TX
tft_rst = board.GP12
tft_dc  = board.GP13
tft_cs  = board.GP14
tft_bl  = board.GP15
spi = busio.SPI(clock=tft_clk, MOSI=tft_mosi)
display_bus = displayio.FourWire(spi, command=tft_dc, chip_select=tft_cs, reset=tft_rst)
display = gc9a01.GC9A01(display_bus, width=240, height=240, backlight_pin=tft_bl)

# ... normal circuitpython displayio stuff

Installation

Each of the .py files in "examples" is its own demo. Copy one of these to be your CIRCUITPY's "code.py", like:

cp gc9a01_hellocircles.py /Volumes/CIRCUITPY/code.py

You'll need to install various libraries. Most notably the gc9a01 library. You may also need the adafruit_display_text and adafruit_imageload, depending on the example. The easiest way to install these is from a terminal:

circup install gc9a01
circup install adafruit_display_text
circup install adafruit_imageload

Examples

Check out the 'examples' directory for complete examples:

  • 'gc9a01_helloworld' -- shows one way of doing polar coordinates
  • 'gc9a01_hellocircles' -- similar to above but with floating circles using vectorio
  • 'gc9a01_picture_locket' -- display a series of pictures, makes a nice locket if used with a QT Py Haxpress
  • 'gc9a01_gauge_knob' -- round dial gauge using gauge background & dial bitmaps, showing bitmaptools.rotozoom

The examples attempt to auto-detect the board you're using. The currently detected boards:

Wiring

Wiring is dependent on board you're hooking it up to. The "SCL" and "SDA" lines need to be hooked up to SPI pins "SCK" and "MOSI/TX". The gc9a01_helloworld.py has example wirings for three different boards. Here is an example for the Pico:

  • VCC - Pico 3.3V(out)
  • Gnd - Pico Ground
  • SCL - Pico GP10 (SPI1 SCK)
  • SDA - Pico GP11 (SPI1 TX)
  • RES - Pico GP12
  • DC - Pico GP13
  • CS - Pico GP14
  • BLK - Pico GP15 (can be omitted if you don't need backlight brightness control)

Here is an example for a QT Py Haxpress:

  • VCC - QT Py 3.3V
  • Gnd - QT Py Ground
  • SCL - QT Py SCK
  • SDA - QT Py MO
  • RES - QT Py TX
  • DC - QT Py A3
  • CS - QT Py A2
  • BLK - unconnected

Building your own dial gauges

There is a partial Python port of @bikerglen's gauge-generator in docs/gauge-generator. These scripts use the wonderful Wand Python wrapper for ImageMagick's C API.

Future Project Ideas:

  • bargraph display using vectorio

Notes to self:

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].