Created
March 28, 2019 09:00
-
-
Save Bardoctorus/4a1240935f8c4bc0893582d5bc869f57 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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