-
Notifications
You must be signed in to change notification settings - Fork 149
Add readme documentation for demos #246
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
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
18c6eb4
Add readme documentation for demos
ninjasource 4ce6f4b
Update README.md
ninjasource a052350
Moved demo readme to its own file
ninjasource 3a7ff09
CI to only check folders in examples folder
ninjasource b283395
Moved descriptions to specific readme files
ninjasource e64e60e
Removed readme from examples folder
ninjasource 338457a
Whitspace formatting
ninjasource 5a6fec4
Suggested PR fixes
ninjasource 059ee47
Fixed broken links
ninjasource File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| # Comp demo | ||
|
|
||
| This demo uses the Comparator (comp) peripheral to compare the differential voltages between two pins. If the voltage on Pin 30 is higher than Pin 31 (reference voltage) the built in LED will switch off otherwise it will switch on. The demo uses `nrf52840-hal` but this can be swapped out with an alternative if required. | ||
|
|
||
| ## How to run | ||
|
|
||
| If using `cargo-embed`, just run | ||
|
|
||
| ```console | ||
| $ cargo embed --release --target=thumbv7em-none-eabihf | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| # Gpiote demo | ||
|
|
||
| The General-Purpose Input Output Tasks and Events (gpiote) module demo targets the nRF52840-DK in particular because of the 4 available hardware buttons on the board itself. The demo shows how you can use the `cortex-m-rtic` crate to easily debounce some buttons without blocking the CPU. GPIO pin state changes fire events which can be used to carry out tasks. This showcases the PPI (programmable peripheral interconnect) system for which there is also a dedicated demo. | ||
|
|
||
| ## How to run | ||
|
|
||
| If using `cargo-embed`, just run | ||
|
|
||
| ```console | ||
| $ cargo embed --release --target=thumbv7em-none-eabihf | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| # I2S controller demo | ||
|
|
||
| The Inter-IC Sound interface (I2S) controller mode (aka master mode) demo. This demo generates Morse code audio signals from text received over UART and plays them back over I2S. Tested with nRF52840-DK and a UDA1334a DAC. | ||
|
|
||
| ## How to run | ||
|
|
||
| If using `cargo-embed`, just run | ||
|
|
||
| ```console | ||
| $ cargo embed --release --target=thumbv7em-none-eabihf | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| # I2S peripheral demo | ||
|
|
||
| The Inter-IC Sound interface (I2S) peripheral mode (aka slave mode) demo. This demonstrates full duplex communication between a controller and peripheral mode I2S peripheral using the EasyDMA capabilities of the chip. This targets the nrf52840 family of devices. | ||
|
|
||
| ## How to run | ||
|
|
||
| If using `cargo-embed`, just run | ||
|
|
||
| ```console | ||
| $ cargo embed --release --target=thumbv7em-none-eabihf | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| # Lpcomp demo | ||
|
|
||
| This low power voltage comparator (lpcomp) demo shows how you would keep the device in low power mode and power it up when an analog voltage on a pin changes with respect to a voltage on a reference pin. This targets the nrf52840 family of devices. | ||
|
|
||
| ## How to run | ||
|
|
||
| If using `cargo-embed`, just run | ||
|
|
||
| ```console | ||
| $ cargo embed --release --target=thumbv7em-none-eabihf | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| # PWM demo | ||
|
|
||
| The pulse width modulation (PWM) demo allows the user to press buttons to change demo modes. This outputs PWM signals to the built in LEDs on the nRF52840-DK. | ||
|
|
||
| ## How to run | ||
|
|
||
| If using `cargo-embed`, just run | ||
|
|
||
| ```console | ||
| $ cargo embed --release --target=thumbv7em-none-eabihf | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| # QDEC demo | ||
|
|
||
| The quadrature decoder (QDEC) is used to read sensor information. This peripheral supports buffered decoding of quadrature-encoded sensor signals (typically used for mechanical and optical sensors). The demo shows how to use a rotary encoder to trigger an interrupt and update a variable by the amount of rotation. (nRF52840 + Bourns PEC11R rotary encoder) | ||
|
|
||
| ## How to run | ||
|
|
||
| If using `cargo-embed`, just run | ||
|
|
||
| ```console | ||
| $ cargo embed --release --target=thumbv7em-none-eabihf | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| # RTIC demo | ||
|
|
||
| The Real-Time Interrupt-driven Concurrency (RTIC) framework demo. Many of the demos in this project use RTIC and demonstrate its capabilities in more detail but this is a bare-bones default template for you to build off. RTIC is not unique to the nRF series but very useful for a program that requires concurrency. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| # SPI slave demo | ||
|
|
||
| The Serial peripheral interface slave (SPIS) demo. This demonstrates the SPIS module, transmitting the current buffer contents while receiving new data. Press the button to zero the buffer. | ||
|
|
||
| ## How to run | ||
|
|
||
| If using `cargo-embed`, just run | ||
|
|
||
| ```console | ||
| $ cargo embed --release --target=thumbv7em-none-eabihf | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| # TWIM demo | ||
|
|
||
| The I2C compatible Two-Wire Interface Master mode (TWIM) demo. This demo uses the TWIM peripheral to read and write 8 bytes of data to arbitrary addresses on a device that are connected to the I2C pins p0_30 and p0_31. It demonstrates error handling if the device does not respond properly (or it is not connected). | ||
|
|
||
| ## How to run | ||
|
|
||
| If using `cargo-embed`, just run | ||
|
|
||
| ```console | ||
| $ cargo embed --release --target=thumbv7em-none-eabihf | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| # TWIS demo | ||
|
|
||
| I2C compatible Two-Wire Interface Slave mode (TWIS) demo. This demo uses the TWIS peripheral with RTIC (Real-Time Interrupt-driven Concurrency) to listen for I2C signals which are exposed as events. The event handler reads data from the peripheral at the address specified. | ||
|
|
||
| ## How to run | ||
|
|
||
| If using `cargo-embed`, just run | ||
|
|
||
| ```console | ||
| $ cargo embed --release --target=thumbv7em-none-eabihf | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| # WDT demo | ||
|
|
||
| This demo uses the watchdog timer (WDT) to show how the entire device can be set to automatically reset if certain conditions are not met within a certain period of time. In this case you have to press all 4 buttons at least once within a 5 second period to prevent a reset. | ||
|
|
||
| > Can you spot an opportunity to crash the program? | ||
| > | ||
| > If you mash the buttons as the time approaches zero you will encounter an 'attempt to subtract with overflow' panic at `main.rs:205` which is ultimately cleared by the watchdog timer. This demonstrates the ability to recover from a panic. Use `probe-run` to see the actual panic message. | ||
|
|
||
| ## How to run | ||
|
|
||
| If using `cargo-embed`, just run | ||
|
|
||
| ```console | ||
| $ cargo embed --release --target=thumbv7em-none-eabihf | ||
| ``` |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.