Simple test
Ensure your device works with this simple test.
examples/yotoplayer_simpletest.py
1# SPDX-FileCopyrightText: 2026 Liz Clark for Adafruit Industries
2#
3# SPDX-License-Identifier: MIT
4"""Simple demo for the Yoto Mini Player"""
5
6from adafruit_yoto import Yoto
7
8yoto = Yoto(
9 default_bg=0x000000,
10 rotation=0,
11 debug=False,
12 auto_refresh=True,
13)
14
15title_index = yoto.add_text(
16 text="Hello World!",
17 text_position=(yoto.display.width // 2, yoto.display.height // 2),
18 text_color=0xFFFFFF,
19 text_scale=3,
20 text_anchor_point=(0.5, 0.5),
21 is_data=False,
22)
23
24if yoto.peripherals.nfc:
25 print(f"NFC: {yoto.peripherals.nfc.device_name}")
26if yoto.peripherals.dac:
27 print(f"DAC: ES8156 (Chip ID: {yoto.peripherals.dac.chip_id:04X})")
28if yoto.peripherals.battery:
29 part = yoto.peripherals.battery.part_info
30 print(f"Battery: {part['part_number']}")
31if yoto.peripherals.rtc:
32 print(f"RTC: {'Valid' if yoto.peripherals.rtc_valid else 'Needs Set'}")
33
34while True:
35 pass