Skip to content

Commit 3e7fde4

Browse files
committed
Add examples to the user guide
1 parent d32b545 commit 3e7fde4

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

examples/noise.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This advanced sample is similar to the sine example, except
1+
# This advanced example is similar to the sine example, except
22
# it generates white noise.
33

44
import array

examples/sine.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This advanced sample shows how to create a custom waveform
1+
# This advanced example shows how to create a custom waveform
22
# for the button to output. In this case, it generates a
33
# sine wave. You can use this example as a basis for very
44
# basic oscillators.

user_guide/docs/index.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,13 @@ If you want to you can learn more about [CircuitPython](https://learn.adafruit.c
100100

101101
## Examples
102102

103-
Big Honking Button can do all sorts of things! We've made a few examples to get you started:
104-
103+
Big Honking Button can do all sorts of things! We've made a few examples to get you started. If you want to use these, copy their contents to `code.py` on the `CIRCUITPY` drive. **Be sure to save it as the correct name,** if you don't name it `code.py` it won't change anything. If you want to restore the original `code.py` it is [here](https://github.com/theacodes/Winterbloom-Big-Honking-Button/blob/master/examples/default.py).
105104

105+
1. [Cycle example](https://github.com/theacodes/Winterbloom-Big-Honking-Button/blob/master/examples/cycle.py): Shows how to load multiple samples and cycle between them.
106+
1. [Random example](https://github.com/theacodes/Winterbloom-Big-Honking-Button/blob/master/examples/default.py): Shows how to load multiple samples and choose one at random.
107+
1. [Tap tempo example](https://github.com/theacodes/Winterbloom-Big-Honking-Button/blob/master/examples/tap_tempo.py): Shows how to use the button to set the tempo and have the module play back a sample at each beat.
108+
1. [Sine example](https://github.com/theacodes/Winterbloom-Big-Honking-Button/blob/master/examples/sine.py): An advanced example that shows how to generate a custom waveform.
109+
1. [Noise example](https://github.com/theacodes/Winterbloom-Big-Honking-Button/blob/master/examples/noise.py): An advanced example that shows how to generate noise.
106110

107111

108112
## Help! I change some code and this thing isn't working!

0 commit comments

Comments
 (0)