Skip to content

Instantly share code, notes, and snippets.

@Bardoctorus Bardoctorus/main.rs
Created Mar 28, 2019

Embed
What would you like to do?
use rust_gpiozero::*;
use std::thread::sleep;
use std::time::Duration;
fn main() {
println!("Hello, world!");
let led = LED::new(18);
loop{
led.on();
//delay
sleep(Duration::from_secs(1));
led.off();
//delay
sleep(Duration::from_secs(1));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.