Skip to content

flxo/funksteckdose

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status crates.io crates.io

Funksteckdose

This program can be used to control 433MHz wireless power outlets. It implements a subset of the functionality of rc-switch. Check the wiki for a list of known and supported devices.

use funksteckdose::{wiringpi::WiringPiPin, Device, EncodingA, Protocol1, State};

fn main() {
    type Funksteckdose = funksteckdose::Funksteckdose<WiringPiPin, EncodingA, Protocol1>;
    let pin = WiringPiPin::new(0);
    let d: Funksteckdose = Funksteckdose::new(pin);
    d.send("10001", &Device::A, &State::On).expect("Failed to send");
}

Most probably you want to build this for arm-unknown-linux-gnueabihf e.g. Raspberry Pi:

cargo build --target arm-unknown-linux-gnueabihf --features wiringpi

Check .cargo/config for a proper linker setting.

About

A partial Rust port of https://github.com/sui77/rc-switch to control wireless sockets via 433Mhz

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published