ftswarm 0.2.5

A simple swarm protocol communication library
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use log::info;
use ftswarm::prelude::*;

#[tokio::main]
async fn main() -> Result<(), String> {
    env_logger::builder()
        .filter_level(log::LevelFilter::Info)
        .filter_module("ftswarm_serial", log::LevelFilter::Trace)
        .init();

    // Automatically connects to the first available ftSwarm
    let swarm = FtSwarm::default();

    let response = swarm.whoami().await?;
    info!("WhoAmI: {}", response);

    Ok(())
}