1 stable release

Uses old Rust 2015

1.0.0 Feb 8, 2018

#50 in #spi

Download history 3/week @ 2023-05-18 8/week @ 2023-05-25 20/week @ 2023-06-01 1/week @ 2023-06-08 26/week @ 2023-06-15 25/week @ 2023-06-22 17/week @ 2023-06-29 15/week @ 2023-07-06 16/week @ 2023-07-13 19/week @ 2023-07-20 52/week @ 2023-07-27 53/week @ 2023-08-03 53/week @ 2023-08-10 17/week @ 2023-08-17 20/week @ 2023-08-24 11/week @ 2023-08-31

116 downloads per month

MIT license

8KB
119 lines

rust-mcp3008

MCP3008 A/D converter

rust-mcp3008 is a rewrite of the excellent Adafruit_Python_MCP3008 Python library in Rust.

Usage

Cargo.toml
[dependencies]
mcp3008 = "1.0.0"

extern crate mcp3008;

use mcp3008::Mcp3008;

fn main() {
    if let Ok(mut mcp3008) = Mcp3008::new("/dev/spidev0.0") {
        println!("{}", mcp3008.read_adc(0).unwrap());
    }
}

lib.rs:

rust-mcp3008 is a rewrite of the excellent Adafruit_Python_MCP3008 Python library in Rust.

Dependencies

~245KB