1 stable release

Uses old Rust 2015

1.0.0 Feb 8, 2018

#2063 in Hardware support

Download history 2/week @ 2024-11-13 12/week @ 2024-11-20 17/week @ 2024-11-27 28/week @ 2024-12-04 40/week @ 2024-12-11 16/week @ 2024-12-18 4/week @ 2024-12-25 2/week @ 2025-01-01 8/week @ 2025-01-08 22/week @ 2025-01-15 15/week @ 2025-01-22 10/week @ 2025-01-29 29/week @ 2025-02-05 42/week @ 2025-02-12 19/week @ 2025-02-19 24/week @ 2025-02-26

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

~0–260KB