diff --git a/README.rst b/README.rst index de97c81..56714f1 100644 --- a/README.rst +++ b/README.rst @@ -27,6 +27,30 @@ Please ensure all dependencies are available on the CircuitPython filesystem. This is easily achieved by downloading `the Adafruit library and driver bundle `_. +Installing from PyPI +===================== +On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally `from +PyPI `_. To install for current user: + +.. code-block:: shell + + pip3 install adafruit-circuitpython-waveform + +To install system-wide (this may be required in some cases): + +.. code-block:: shell + + sudo pip3 install adafruit-circuitpython-waveform + +To install in a virtual environment in your current project: + +.. code-block:: shell + + mkdir project-name && cd project-name + python3 -m venv .env + source .env/bin/activate + pip3 install adafruit-circuitpython-waveform + Usage Example ============= @@ -90,4 +114,3 @@ Now, once you have the virtual environment activated: This will output the documentation to ``docs/_build/html``. Open the index.html in your browser to view them. It will also (due to -W) error out on any warning like Travis will. This is a good way to locally verify it will pass. - diff --git a/adafruit_waveform/sine.py b/adafruit_waveform/sine.py index a0d73bc..adc7025 100644 --- a/adafruit_waveform/sine.py +++ b/adafruit_waveform/sine.py @@ -32,6 +32,10 @@ import array import math +__version__ = "0.0.0-auto.0" +__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_Waveform.git" + + def sine_wave(sample_frequency, pitch): """Generate a single sine wav cycle at the given sampling frequency and pitch.""" length = int(sample_frequency / pitch) diff --git a/adafruit_waveform/square.py b/adafruit_waveform/square.py index 42b3639..66ce752 100644 --- a/adafruit_waveform/square.py +++ b/adafruit_waveform/square.py @@ -31,6 +31,9 @@ import array +__version__ = "0.0.0-auto.0" +__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_Waveform.git" + def square_wave(sample_length=2): """Generate a single square wave of sample_length size"""