#raspberry-pi #gpio #wiring-pi #cross-compiling #deprecated

nightly cylus

Inspired by WiringPi, a library for RaspberryPi GPIO

1 unstable release

Uses old Rust 2015

0.1.0 Jan 31, 2016

#65 in #gpio

MIT license

5KB
92 lines

Cylus Build status

######Library for RaspberryPi GPIO - Documentation

To cross-compile on RaspberryPi, follow these instructions: https://github.com/Ogeon/rust-on-raspberry-pi

#Example

#![allow(deprecated)]
extern crate cylus;

use cylus::Cylus;

fn main() {
    println!("Starting..");
    let gpio = Cylus::new(24);
    for _ in 1..10 {
        println!("{}", gpio.read());
        gpio.high();
        
        std::thread::sleep_ms(1000);
        println!("{}", gpio.read());
        
        gpio.low();
        std::thread::sleep_ms(1000);
    }
}

#TODO

  • get Rust working on raspberrypi
  • Read BCM2835 ARM Peripherals manual
  • make it work

#Converting into a library

  • simple digital GPIO input/output
  • add Pwm functionality
  • publish to crates.io

Dependencies

~395–620KB