Skip to content

improving_docs #19

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ Introduction
:target: https://github.com/adafruit/Adafruit_CircuitPython_SI4713/actions/
:alt: Build Status

.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/psf/black
:alt: Code Style: Black

CircuitPython module for SI4713 and SI4721 FM RDS transmitter.

Dependencies
Expand Down
31 changes: 23 additions & 8 deletions adafruit_si4713.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,21 @@
at: https://github.com/adafruit/Adafruit-Si4713-Library/

* Author(s): Tony DiCola

**Hardware:**

* `Adafruit Stereo FM Transmitter with RDS/RBDS Breakout - Si4713
<https://www.adafruit.com/product/1958>`_ (Product ID: 1958)


**Software and Dependencies:**

* Adafruit CircuitPython firmware for the supported boards:
https://circuitpython.org/downloads

* Adafruit's Bus Device library:
https://github.com/adafruit/Adafruit_CircuitPython_BusDevice

"""
import time

Expand Down Expand Up @@ -86,14 +101,14 @@

class SI4713:
"""SI4713 RDS FM transmitter. Initialize by specifying:
- i2c: The I2C bus connected to the board.

Optionally specify:
- address: The I2C address if it has been changed.
- reset: A DigitalInOut instance connected to the board's reset line,
this will be used to perform a soft reset when necessary.
- timeout_s: The amount of time (in seconds) to wait for a command to
succeed. If this timeout is exceed a runtime error is thrown.

:param ~busio.I2C i2c: The I2C bus connected to the board.
:param int address: The I2C address if it has been changed. Defaults to :const:`0x63`
:param ~digitalio.DigitalInOut reset: A DigitalInOut instance connected to
the board's reset line, this will be used to perform a soft reset when necessary.
:param float timeout_s: The amount of time (in seconds) to wait for a command to
succeed. If this timeout is exceed a runtime error is thrown. Defaults to :const:`0.1`

"""

# Class-level buffer to reduce allocations and heap fragmentation.
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.intersphinx",
"sphinx.ext.todo",
"sphinx.ext.viewcode",
]

# Uncomment the below if you use native CircuitPython modules such as
Expand Down
4 changes: 4 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,13 @@ Table of Contents
.. toctree::
:caption: Tutorials

Adafruit Stereo FM Transmitter with RDS/RBDS Breakout - Si4713 Learning Guide <https://learn.adafruit.com/adafruit-si4713-fm-radio-transmitter-with-rds-rdbs-support>

.. toctree::
:caption: Related Products

Adafruit Stereo FM Transmitter with RDS/RBDS Breakout - Si4713 <https://www.adafruit.com/product/1958>

.. toctree::
:caption: Other Links

Expand Down
5 changes: 1 addition & 4 deletions examples/si4713_simpletest.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,16 @@
# Simple demo of using the SI4743 RDS FM transmitter.

import time

import board
import busio
import digitalio

import adafruit_si4713

# Specify the FM frequency to transmit on in kilohertz. As the datasheet
# mentions you can only specify 50khz steps!
FREQUENCY_KHZ = 102300 # 102.300mhz

# Initialize I2C bus.
i2c = busio.I2C(board.SCL, board.SDA)
i2c = board.I2C() # uses board.SCL and board.SDA

# Initialize SI4713.
# si4713 = adafruit_si4713.SI4713(i2c)
Expand Down