firmata 0.2.0

A client library for communicating with devices using the firmata protocol
Documentation
extern crate firmata;

use firmata::*;
use std::thread;

fn main() {
    let mut b = firmata::Board::new("/dev/ttyACM0");

    println!("firmware version {}", b.firmware_version);
    println!("firmware name {}", b.firmware_name);
    println!("protocol version {}", b.protocol_version);

    b.set_pin_mode(13, firmata::OUTPUT);

    let mut i = 0;

    loop {
        thread::sleep_ms(400);
        println!("{}",i);
        b.digital_write(13, i);
        i ^= 1;
    }
}