Skip to content

Commit

Permalink
Add examples to the user guide
Browse files Browse the repository at this point in the history
  • Loading branch information
theacodes committed Jun 23, 2020
1 parent d32b545 commit 3e7fde4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/noise.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This advanced sample is similar to the sine example, except
# This advanced example is similar to the sine example, except
# it generates white noise.

import array
Expand Down
2 changes: 1 addition & 1 deletion examples/sine.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This advanced sample shows how to create a custom waveform
# This advanced example shows how to create a custom waveform
# for the button to output. In this case, it generates a
# sine wave. You can use this example as a basis for very
# basic oscillators.
Expand Down
8 changes: 6 additions & 2 deletions user_guide/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,13 @@ If you want to you can learn more about [CircuitPython](https://learn.adafruit.c

## Examples

Big Honking Button can do all sorts of things! We've made a few examples to get you started:

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).

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.
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.
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.
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.
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.


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

0 comments on commit 3e7fde4

Please sign in to comment.