Registry / other / rppal
library0.22.1rscratesunverified

Interface for the Raspberry Pi's GPIO, I2C, PWM, SPI and UART peripherals.

# Cargo.toml [dependencies] rppal = "0.22.1"
INSTALL
IMPORT
SIG · RPPAL
R
rppal
otherrustv0.22.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Gpio
use rppal::gpio::Gpio;

Toggle GPIO pin 17 high for one second then low.

use rppal::gpio::Gpio; use std::thread; use std::time::Duration; let gpio = Gpio::new().unwrap(); let mut pin = gpio.get(17).unwrap().into_output(); pin.set_high(); thread::sleep(Duration::from_secs(1)); pin.set_low();
Debug
Known issues
gotchaOnly works on Raspberry Pi hardware; will panic on other platforms.
fix
Use conditional compilation or run only on Raspberry Pi.
affects: >=0.1.0
Upgrade
Version history
0.22.1latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
7 hits · last 30 days
node
6
Amazon
1
Resources
rppal — cargo add rppal · libregistry