Skip to main content

Python your own Adventure - card & button game

Project description

Introduction

Documentation Status Discord Build Status Code Style: Ruff

A CircuitPython ‘Choose Your Own Adventure’ framework for PyPortal.

Dependencies

This driver depends on:

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

adafruit_circuitpython_pyoa-2.6.8.tar.gz (7.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

adafruit_circuitpython_pyoa-2.6.8-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file adafruit_circuitpython_pyoa-2.6.8.tar.gz.

File metadata

File hashes

Hashes for adafruit_circuitpython_pyoa-2.6.8.tar.gz
Algorithm Hash digest
SHA256 fdae51ba8c3fd0d78881e043d16b3f25bcad4a7f64d85612ac1e0c8ef1b19774
MD5 15d3f21525d85a31d41ba569c43988d8
BLAKE2b-256 c9920006bdce66548ceca6e321d29e39a6595a39eb0b054f4721ec6e8b5d58c5

See more details on using hashes here.

File details

Details for the file adafruit_circuitpython_pyoa-2.6.8-py3-none-any.whl.

File metadata

File hashes

Hashes for adafruit_circuitpython_pyoa-2.6.8-py3-none-any.whl
Algorithm Hash digest
SHA256 37131d60c80da519e1cabe8e0625a2b6bd63629852929c63daf4a5b34db0b09a
MD5 24bb03655ebe5e8120df6de252b93c78
BLAKE2b-256 9bd576937390e4b943d25b43569c41b01099c6dad1eb859ac52cbfd6a87f49fd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page