blob: 9198f1bd17b443b8fce4d192ceb744a5466a2d12 [file] [log] [blame]
#![no_std]
use core::fmt::Write;
use libtock::result::TockResult;
use libtock::Drivers;
#[libtock::main]
async fn main() -> TockResult<()> {
let Drivers {
console_driver,
mut temperature_driver,
..
} = libtock::retrieve_drivers()?;
let mut console = console_driver.create_console();
let temperature = temperature_driver.measure_temperature().await?;
writeln!(console, "Temperature: {}", temperature).map_err(Into::into)
}