File tree Expand file tree Collapse file tree 3 files changed +31
-1
lines changed Expand file tree Collapse file tree 3 files changed +31
-1
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,30 @@ Please ensure all dependencies are available on the CircuitPython filesystem.
27
27
This is easily achieved by downloading
28
28
`the Adafruit library and driver bundle <https://github.com/adafruit/Adafruit_CircuitPython_Bundle >`_.
29
29
30
+ Installing from PyPI
31
+ =====================
32
+ On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally `from
33
+ PyPI <https://pypi.org/project/adafruit-circuitpython-waveform/> `_. To install for current user:
34
+
35
+ .. code-block :: shell
36
+
37
+ pip3 install adafruit-circuitpython-waveform
38
+
39
+ To install system-wide (this may be required in some cases):
40
+
41
+ .. code-block :: shell
42
+
43
+ sudo pip3 install adafruit-circuitpython-waveform
44
+
45
+ To install in a virtual environment in your current project:
46
+
47
+ .. code-block :: shell
48
+
49
+ mkdir project-name && cd project-name
50
+ python3 -m venv .env
51
+ source .env/bin/activate
52
+ pip3 install adafruit-circuitpython-waveform
53
+
30
54
Usage Example
31
55
=============
32
56
@@ -90,4 +114,3 @@ Now, once you have the virtual environment activated:
90
114
This will output the documentation to ``docs/_build/html ``. Open the index.html in your browser to
91
115
view them. It will also (due to -W) error out on any warning like Travis will. This is a good way to
92
116
locally verify it will pass.
93
-
Original file line number Diff line number Diff line change 32
32
import array
33
33
import math
34
34
35
+ __version__ = "0.0.0-auto.0"
36
+ __repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_Waveform.git"
37
+
38
+
35
39
def sine_wave (sample_frequency , pitch ):
36
40
"""Generate a single sine wav cycle at the given sampling frequency and pitch."""
37
41
length = int (sample_frequency / pitch )
Original file line number Diff line number Diff line change 31
31
32
32
import array
33
33
34
+ __version__ = "0.0.0-auto.0"
35
+ __repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_Waveform.git"
36
+
34
37
35
38
def square_wave (sample_length = 2 ):
36
39
"""Generate a single square wave of sample_length size"""
You can’t perform that action at this time.
0 commit comments