Skip to content

PhilipTrauner/rust-mcp3008

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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());
    }
}

Releases

No releases published

Packages

No packages published

Languages