Use CircuitPython displayio code on PC and Raspberry Pi outputting to a PyGame window instead of a physical display.
Project description
Introduction
VERSION NOTICE
This library has not been updated to work with Blinka_DisplayIO 1.0.0+ yet. The most recent version of Bliaka_DisplayIO that is supported is 0.11.1.
Info
Blinka makes her debut on the big screen! With this library you can use CircuitPython displayio code on PC and Raspberry Pi to output to a PyGame window instead of a hardware display connected to I2C or SPI. This makes it easy to to use displayio elements on HDMI and other large format screens.
Warning: you must check display.check_quit() in the main loop and break if it’s true in order to correctly handle the close button!
Dependencies
This driver depends on:
Please ensure all dependencies are available they can be installed with pip3
Optional Dependencies
This driver can optionally make use of these displayio module libraries:
They can be installed with pip3.
Installing from PyPI
On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally from PyPI. To install for current user:
pip3 install blinka-displayio-pygamedisplay
To install system-wide (this may be required in some cases):
sudo pip3 install blinka-displayio-pygamedisplay
To install in a virtual environment in your current project:
mkdir project-name && cd project-name
python3 -m venv .env
source .env/bin/activate
pip3 install blinka-displayio-pygamedisplay
Usage Example
import displayio
from blinka_displayio_pygamedisplay import PyGameDisplay
display = PyGameDisplay(width=320, height=240)
splash = displayio.Group()
display.show(splash)
color_bitmap = displayio.Bitmap(display.width, display.height, 1)
color_palette = displayio.Palette(1)
color_palette[0] = 0x00FF00 # Bright Green
bg_sprite = displayio.TileGrid(color_bitmap, pixel_shader=color_palette, x=0, y=0)
splash.append(bg_sprite)
# Must check display.running in the main loop!
while True:
if display.check_quit():
break
Contributing
Contributions are welcome! Please read our Code of Conduct before contributing to help this project stay welcoming.
Documentation
For information on building library documentation, please check out this guide.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file blinka-displayio-pygamedisplay-2.4.0.tar.gz
.
File metadata
- Download URL: blinka-displayio-pygamedisplay-2.4.0.tar.gz
- Upload date:
- Size: 233.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | aebdaadaa38a643dd77949e76ae46263b94f670edd6344dc44fa1baa875991d6 |
|
MD5 | 0792ae48a7c91bbf1b4aa8ba0b0eb335 |
|
BLAKE2b-256 | 3a8845ed79034d0760f9bfb8033f3692e73e515ac270fae38a5e1c64527dfec5 |
File details
Details for the file blinka_displayio_pygamedisplay-2.4.0-py3-none-any.whl
.
File metadata
- Download URL: blinka_displayio_pygamedisplay-2.4.0-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2be1f0b1a956bd4faeadf124ac9c46db811e4f2e5e71cb2d8915a4f302fa97e6 |
|
MD5 | a48da386bd71147fe8a4571c6b7be7ae |
|
BLAKE2b-256 | 51736b2c6f577c60291fe464703c0db2d554837079cd17c8dcaf3700586dc264 |