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)
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.