pi_info 0.1.3

Library to get info from Raspberry Pi like model or cpu temperture
Documentation
1
2
3
4
5
6
7
8
9
10
use std::error::Error;
use std::fs;

pub mod constants;

pub fn read_to_i32(path: &str) -> Result<i32, Box<dyn Error>> {
    let value = fs::read_to_string(path)?;

    Ok(value.trim().parse::<i32>()?)
}