arduinors 0.1.1

Firmata-based interface to an Arduino and the Arduino CLI.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! This is an example program demonstrating interactions with the Arduino CLI.

use std::path::Path;
use arduinors::cli;

fn main() {
    let fqbn = cli::query(cli::Query::Fqbn).unwrap();
    println!("FQBN: {}", fqbn);

    let port = cli::query(cli::Query::Port).unwrap();
    println!("Port: {}", port);

    let sketch = Path::new("sketch-path");

    cli::compile(sketch).unwrap();
    cli::upload(sketch).unwrap();
}