Skip to content

Commit 0a489f9

Browse files
committed
docs
1 parent 0d7f2a5 commit 0a489f9

9 files changed

Lines changed: 60 additions & 29 deletions

File tree

README.rst

Lines changed: 34 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -23,34 +23,24 @@ Introduction
2323

2424
PortalBase helper library for the Yoto Players
2525

26-
2726
Dependencies
2827
=============
2928
This 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

3536
Please ensure all dependencies are available on the CircuitPython filesystem.
3637
This is easily achieved by downloading
3738
`the Adafruit library and driver bundle <https://circuitpython.org/libraries>`_
3839
or 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-
4842
Installing 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

5545
On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally `from
5646
PyPI <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=0x000000,
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
=============

adafruit_yoto/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"""
1414

1515
__version__ = "0.0.0+auto.0"
16-
__repo__ = "https://github.com/yourrepo/Adafruit_CircuitPython_Yoto.git"
16+
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_YotoPlayer.git"
1717

1818
from adafruit_yoto.yoto import Yoto
1919
from adafruit_yoto.peripherals import Peripherals

adafruit_yoto/graphics.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
from adafruit_portalbase.graphics import GraphicsBase
3232

3333
__version__ = "0.0.0+auto.0"
34-
__repo__ = "https://github.com/yourrepo/Adafruit_CircuitPython_Yoto.git"
34+
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_YotoPlayer.git"
3535

3636

3737
class Graphics(GraphicsBase):

adafruit_yoto/network.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
from adafruit_portalbase.wifi_esp32s2 import WiFi
3232

3333
__version__ = "0.0.0+auto.0"
34-
__repo__ = "https://github.com/yourrepo/Adafruit_CircuitPython_Yoto.git"
34+
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_YotoPlayer.git"
3535

3636

3737
class Network(NetworkBase):

adafruit_yoto/peripherals.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
from adafruit_pcf8563.pcf8563 import PCF8563
3838

3939
__version__ = "0.0.0+auto.0"
40-
__repo__ = "https://github.com/yourrepo/Adafruit_CircuitPython_Yoto.git"
40+
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_YotoPlayer.git"
4141

4242

4343
class Peripherals:

adafruit_yoto/yoto.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
from adafruit_yoto.peripherals import Peripherals
3535

3636
__version__ = "0.0.0+auto.0"
37-
__repo__ = "https://github.com/yourrepo/Adafruit_CircuitPython_Yoto.git"
37+
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_YotoPlayer.git"
3838

3939

4040
class Yoto(PortalBase):

docs/api.rst

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,23 @@
77
API Reference
88
#############
99

10-
.. automodule:: adafruit_yotoplayer
10+
.. automodule:: adafruit_yoto.cr95hf
11+
:members:
12+
13+
.. automodule:: adafruit_yoto.es8156
14+
:members:
15+
16+
.. automodule:: adafruit_yoto.graphics
17+
:members:
18+
19+
.. automodule:: adafruit_yoto.network
20+
:members:
21+
22+
.. automodule:: adafruit_yoto.peripherals
23+
:members:
24+
25+
.. automodule:: adafruit_yoto.sgm41513
26+
:members:
27+
28+
.. automodule:: adafruit_yoto.yoto
1129
:members:

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
# Uncomment the below if you use native CircuitPython modules such as
2626
# digitalio, micropython and busio. List the modules you use. Without it, the
2727
# autodoc module docs will fail to generate with a warning.
28-
# autodoc_mock_imports = ["digitalio", "busio"]
28+
autodoc_mock_imports = ["digitalio", "busio", "audiobusio", "rotaryio", ]
2929

3030
autodoc_preserve_defaults = True
3131

docs/index.rst

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,7 @@ Table of Contents
2424
.. toctree::
2525
:caption: Tutorials
2626

27-
.. todo:: Add any Learn guide links here. If there are none, then simply delete this todo and leave
28-
the toctree above for use later.
29-
30-
.. toctree::
31-
:caption: Related Products
32-
33-
.. todo:: Add any product links here. If there are none, then simply delete this todo and leave
34-
the toctree above for use later.
27+
Hacking the Yoto Music Players Learn Guide <https://learn.adafruit.com/hacking-the-yoto-music-players>
3528

3629
.. toctree::
3730
:caption: Other Links

0 commit comments

Comments
 (0)