Examples

There are several examples for different chips to show how drogue device can be used. The examples are grouped by how advanced they are, and what they demonstrate such as networking, but may overlap for examples that cover more than one area.

All example can be run using cargo run, which in some cases require the probe-run tool (cargo install probe-run) to flash the program.

Any examples requiring user credentials, e.g. WiFi, HTTP, OTAA, will expect them in the top-level keys of .drogue/config.toml. Similar to how cargo configuration works, the build script for each example looks for that configuration file in the manifest directory, all of its parent directories, and finally in $HOME/.drogue/config.toml. If a key is specified in multiple config files, the values will be merged, with the value in the deeper directory taking precedence over its parents, the home directory having the lowest priority.

Credentials for your local WiFi network:

wifi-ssid = "..."
wifi-password = "..."

HTTP authentication:

http-username = "..."
http-password = "..."

Over The Air Authentication (OTAA) credentials:

"dev-eui" = "..."
"app-eui" = "..."
"app-key" = "..."

These values will be read during compilation and stored in the executable.

Basic examples

Basic examples that only require a single board without any additional hardware.

WiFi connectivity examples

Examples that demonstrates network connectivity using WiFi, usually using an additional network adapter module. May require setting up additional network services (locally or third party).

BLE connectivity examples

Examples that demonstrates using Bluetooth Low Energy (BLE). May require running applications on a phone or PC.

Display examples

UART examples

Examples that demonstrates the use of a UART.