1 stable release

Uses old Rust 2015

1.0.0 Feb 8, 2018

#1902 in Hardware support

Download history 11/week @ 2024-07-20 24/week @ 2024-07-27 14/week @ 2024-08-03 21/week @ 2024-08-10 10/week @ 2024-08-17 9/week @ 2024-08-24 18/week @ 2024-08-31 11/week @ 2024-09-07 17/week @ 2024-09-14 33/week @ 2024-09-21 25/week @ 2024-09-28 6/week @ 2024-10-05 20/week @ 2024-10-12 18/week @ 2024-10-19 13/week @ 2024-10-26 25/week @ 2024-11-02

76 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

~0–260KB