Skip to content

Instantly share code, notes, and snippets.

@Bardoctorus
Created March 28, 2019 09:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Bardoctorus/4a1240935f8c4bc0893582d5bc869f57 to your computer and use it in GitHub Desktop.
Save Bardoctorus/4a1240935f8c4bc0893582d5bc869f57 to your computer and use it in GitHub Desktop.
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