extern crate shuteye;

extern crate ultrasonic_irq;

use std::time::Duration;
use std::thread::sleep;

use ultrasonic_irq::Ultrasonic;

static GPIO_PORT_TRIG: u8 = 23;
static GPIO_PORT_ECHO: u8 = 24;
static TEMPERATURE: u8 = 20;

fn main() {
    let ultrasonic = Ultrasonic::new(GPIO_PORT_TRIG, GPIO_PORT_ECHO, TEMPERATURE)
        .expect("Create Ultrasonic failed");

    println!("{:?}", ultrasonic);

    sleep(Duration::new(10, 0));
}
