Python your own Adventure - card & button game
Project description
Introduction
A CircuitPython ‘Choose Your Own Adventure’ framework for PyPortal.
Dependencies
This driver depends on:
Adafruit CircuitPython <https://github.com/adafruit/circuitpython>
Please ensure all dependencies are available on the CircuitPython filesystem. This is easily achieved by downloading the Adafruit library and driver bundle.
Usage Example
import adafruit_sdcard
import storage
from adafruit_pyoa import PYOA_Graphics
import board
import digitalio
try:
sdcard = adafruit_sdcard.SDCard(board.SPI(), digitalio.DigitalInOut(board.SD_CS))
vfs = storage.VfsFat(sdcard)
storage.mount(vfs, "/sd")
print("SD card found") # no biggie
except OSError:
print("No SD card found") # no biggie
gfx = PYOA_Graphics()
gfx.load_game("/cyoa")
current_card = 0 # start with first card
while True:
print("Current card:", current_card)
current_card = gfx.display_card(current_card)
Documentation
API documentation for this library can be found on Read the Docs.
For information on building library documentation, please check out this guide.
Contributing
Contributions are welcome! Please read our Code of Conduct before contributing to help this project stay welcoming.
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 adafruit-circuitpython-PYOA-2.6.1.tar.gz
.
File metadata
- Download URL: adafruit-circuitpython-PYOA-2.6.1.tar.gz
- Upload date:
- Size: 7.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 039a1d1cc5a1d77d69857fc1a142f8e7c95d43103466cde53e46fe699709fbab |
|
MD5 | 8549ef13bc73998e9e90da7a8398b253 |
|
BLAKE2b-256 | a30879f8b4374fa4a1a3fb88cd54e12bff3d71d38c426b09bb1d5d0ee1271d0c |
File details
Details for the file adafruit_circuitpython_PYOA-2.6.1-py3-none-any.whl
.
File metadata
- Download URL: adafruit_circuitpython_PYOA-2.6.1-py3-none-any.whl
- Upload date:
- Size: 8.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a26b16289ba099d4727a0afa1a37a4463100c70a7856b7154f69a4030abaaa6 |
|
MD5 | 93fdd0d283793a83dad4a85d966f05db |
|
BLAKE2b-256 | 1ea05c0d472a804df2259893d11857e7f8ed4690fa607dbb951971fdb27e5a2e |