CircuitPython Helper Library
With so many peripherals on the Yoto Players, from the display to the RTC to the I2S DAC and more, it seemed like a good idea to put together a helper library to use it with CircuitPython. The library is compatible with the PortalBase libraries and makes it easy to initialize and access all of the onboard peripherals without having to worry about getting all of the imports right.
Library Usage with Web Workflow
To use with CircuitPython, you need to first install the YotoPlayer library, and its dependencies, into the lib folder on the Yoto Mini. Then you need to update code.py with the example script.
Thankfully, we can do this in one go. In the example below, click the Download Project Bundle button below to download the necessary libraries and the code.py file in a zip file.
# SPDX-FileCopyrightText: 2026 Liz Clark for Adafruit Industries
#
# SPDX-License-Identifier: MIT
"""Simple demo for the Yoto Mini Player"""
from adafruit_yoto import Yoto
yoto = Yoto(
default_bg=0x000000,
rotation=0,
debug=False,
auto_refresh=True,
)
title_index = yoto.add_text(
text="Hello World!",
text_position=(yoto.display.width // 2, yoto.display.height // 2),
text_color=0xFFFFFF,
text_scale=3,
text_anchor_point=(0.5, 0.5),
is_data=False,
)
if yoto.peripherals.nfc:
print(f"NFC: {yoto.peripherals.nfc.device_name}")
if yoto.peripherals.dac:
print(f"DAC: ES8156 (Chip ID: {yoto.peripherals.dac.chip_id:04X})")
if yoto.peripherals.battery:
part = yoto.peripherals.battery.part_info
print(f"Battery: {part['part_number']}")
if yoto.peripherals.rtc:
print(f"RTC: {'Valid' if yoto.peripherals.rtc_valid else 'Needs Set'}")
while True:
pass
Extract the contents of the zip file. You'll see the following contents in the extracted folder:
Next, you'll upload the code.py file to the Yoto Mini. Click the Upload button and then Upload Files.
After running the code, you'll see the peripherals recognized over I2C in the serial monitor:
The manual display refresh demo shows how you can load bitmap images to the onboard display and how to interface with the rotary encoder buttons. Pressing the buttons will change the Blinka image shown.
The MP3 player demo lets you use the Yoto Mini as a portable MP3 player. The code loads album folders from the /sd directory and can display the album artwork on the display. Then, the .mp3 audio files will play through the headphone jack. You can use the left rotary encoder to adjust volume and the right rotary encoder to advance or rewind tracks.
If you hack your own Yoto Player with CircuitPython, please write up your creations to the Adafruit Playground and bring them by Show and Tell!
Page last edited February 05, 2026
Text editor powered by tinymce.