mcp3008 1.0.0

A MCP3008 sensor driver for Rust.
Documentation
  • Coverage
  • 25%
    2 out of 8 items documented0 out of 4 items with examples
  • Size
  • Source code size: 7.71 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 391.43 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 12s Average build duration of successful builds.
  • all releases: 12s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • PhilipTrauner/rust-mcp3008
    7 4 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • PhilipTrauner

rust-mcp3008

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

Usage

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