adafruit_pyoa
¶
A CircuitPython ‘Choose Your Own Adventure’ framework for PyPortal.
- Author(s): Adafruit
Implementation Notes¶
Hardware:
Software and Dependencies:
- Adafruit CircuitPython firmware for the supported boards: https://github.com/adafruit/circuitpython/releases
-
class
adafruit_pyoa.
PYOA_Graphics
¶ A choose your own adventure game framework.
-
backlight_fade
(to_light)¶ Adjust the TFT backlight. Fade from one value to another
-
display_card
(card_num)¶ Display and handle input on a card.
Parameters: card_num – the index of the card to process
-
load_game
(game_directory)¶ Load a game.
Parameters: game_directory – where the game files are stored
-
play_sound
(filename, *, wait_to_finish=True, loop=False)¶ Play a sound
Parameters: - filename – The filename of the sound to play
- wait_to_finish – Whether playing the sound should block
- loop – Whether the sound should loop
-
set_background
(filename, *, with_fade=True)¶ The background image to a bitmap file.
Parameters: filename – The filename of the chosen background
-
set_text
(text, color)¶ Display the test for a card.
Parameters: - text – the text to display
- color – the text color
-