@@ -23,34 +23,24 @@ Introduction
2323
2424PortalBase helper library for the Yoto Players
2525
26-
2726Dependencies
2827=============
2928This driver depends on:
3029
3130* `Adafruit CircuitPython <https://github.com/adafruit/circuitpython >`_
3231* `Bus Device <https://github.com/adafruit/Adafruit_CircuitPython_BusDevice >`_
3332* `Register <https://github.com/adafruit/Adafruit_CircuitPython_Register >`_
33+ * `PortalBase <https://github.com/adafruit/Adafruit_CircuitPython_PortalBase >`_
34+ * `PCF8563 <https://github.com/adafruit/Adafruit_CircuitPython_PCF8563 >`_
3435
3536Please ensure all dependencies are available on the CircuitPython filesystem.
3637This is easily achieved by downloading
3738`the Adafruit library and driver bundle <https://circuitpython.org/libraries >`_
3839or individual libraries can be installed using
3940`circup <https://github.com/adafruit/circup >`_.
4041
41-
42-
43- .. todo :: Describe the Adafruit product this library works with. For PCBs, you can also add the
44- image from the assets folder in the PCB's GitHub repo.
45-
46- `Purchase one from the Adafruit shop <http://www.adafruit.com/products/ >`_
47-
4842Installing from PyPI
4943=====================
50- .. note :: This library is not available on PyPI yet. Install documentation is included
51- as a standard element. Stay tuned for PyPI availability!
52-
53- .. todo :: Remove the above note if PyPI version is/will be available at time of release.
5444
5545On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally `from
5646PyPI <https://pypi.org/project/adafruit-circuitpython-yotoplayer/> `_.
@@ -101,8 +91,38 @@ Or the following command to update an existing version:
10191 Usage Example
10292=============
10393
104- .. todo :: Add a quick, simple example. It and other examples should live in the
105- examples folder and be included in docs/examples.rst.
94+ .. code-block :: python
95+
96+ from adafruit_yoto import Yoto
97+
98+ yoto = Yoto(
99+ default_bg = 0x 000000 ,
100+ rotation = 0 ,
101+ debug = False ,
102+ auto_refresh = True ,
103+ )
104+
105+ title_index = yoto.add_text(
106+ text = " Hello World!" ,
107+ text_position = (yoto.display.width // 2 , yoto.display.height // 2 ),
108+ text_color = CYAN ,
109+ text_scale = 3 ,
110+ text_anchor_point = (0.5 , 0.5 ),
111+ is_data = False
112+ )
113+
114+ if yoto.peripherals.nfc:
115+ print (f " NFC: { yoto.peripherals.nfc.device_name} " )
116+ if yoto.peripherals.dac:
117+ print (f " DAC: ES8156 (Chip ID: { yoto.peripherals.dac.chip_id:04X } ) " )
118+ if yoto.peripherals.battery:
119+ part = yoto.peripherals.battery.part_info
120+ print (f " Battery: { part[' part_number' ]} " )
121+ if yoto.peripherals.rtc:
122+ print (f " RTC: { ' Valid' if yoto.peripherals.rtc_valid else ' Needs Set' } " )
123+
124+ while True :
125+ pass
106126
107127 Documentation
108128=============
0 commit comments