Skip to content

Developer Quickstart#

If you are setting up an EP01 for normal use, start with EP01 Setup. The browser tool covers WebSerial connection, firmware updates, appearance presets, WiFi pairing, and touch sensor data before you need any developer tools.

This guide gets an EP01 visible from your computer, confirms the Rust SDK and CLI can talk to it, and shows the first control command. The Rust SDK is the core Enody SDK; Python and JavaScript packages build on the same public device model for language-specific workflows.

For the full dependency list, see Install and Prerequisites.

Install#

Install the Rust CLI:

cargo install enody

For application development, add the Rust crate to your project:

[dependencies]
enody = "0.2.1"
tokio = { version = "1.52.3", features = ["full"] }

libusb#

The SDK utilizes multiple USB backends to access the device. Some host machines may require libusb to communicate with EP01. Attempt to communicate with EP01 first, then install libusb if no devices are found.

Platform Dependency
macOS brew install libusb
Debian / Ubuntu sudo apt install libusb-1.0-0
Fedora / RHEL sudo dnf install libusb1
Arch sudo pacman -S libusb
Alpine apk add libusb
Windows Bundled with the host tooling

Connect over USB#

Plug EP01 into USB, then run:

enody list
enody info

enody list prints connected devices and firmware versions. enody info prints the host, fixtures, sources, and emitter counts discovered through the public SDK hierarchy.

Example output:

Device 00000000-0000-0000-0000-000000000000
    Version: 0.2.0

Update EP01#

enody update

The update command discovers attached EP01 devices, lists available firmware versions for the selected device, asks for confirmation, and verifies the device after the update.

See Update Firmware for offline image updates and safety notes.

Set a blackbody target#

use enody::environment::Environment;
use enody::message::{Configuration, Flux};
use enody::usb::UsbEnvironment;

#[tokio::main]
async fn main() -> Result<(), enody::Error> {
    let env = UsbEnvironment::new();
    let runtime = env
        .runtimes()
        .into_iter()
        .next()
        .ok_or(enody::Error::InsufficientData)?;
    let host = runtime.host().await?;
    let fixture = host
        .fixtures()
        .await?
        .into_iter()
        .next()
        .ok_or(enody::Error::InsufficientData)?;

    fixture
        .display(Configuration::Blackbody(2700.0), Flux::Relative(0.8))
        .await?;

    Ok(())
}

This displays a 2700 K blackbody configuration at 80% relative flux.

Join WiFi and save a token#

WiFi setup starts from USB so the host application can authenticate the device before saving a WiFi token.

enody wifi-setup

After a token is saved, enody info can discover saved-token devices over WiFi as well as USB. Rust applications can load the same token store through TokenStore and use WifiEnvironment for saved-token discovery.

Work with captured spectral data#

For offline algorithm development, export spectral data to a JSON snapshot:

enody download-spectral-data -o spectral-data.json

That file contains the host, fixture, source, emitter, and spectral sample data needed by Rust tools and tests without keeping a device connected.