Skip to content

Commit

Permalink
Fix blink example
Browse files Browse the repository at this point in the history
  • Loading branch information
rahul-thakoor committed Feb 28, 2019
1 parent 1261e43 commit 8f3bdc7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,12 @@ use rust_gpiozero::*;
fn main() {
// Create a new LED attached to Pin 17
let mut led = LED::new(17);
// blink the LED
led.blink(2.0, 3.0);

// on_time = 2 secs, off_time=3 secs
led.blink(2.0,3.0);

// prevent program from exiting immediately
led.wait();
}

```
Expand Down
8 changes: 6 additions & 2 deletions examples/blink.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ use rust_gpiozero::*;
fn main() {
// Create a new LED attached to Pin 17
let mut led = LED::new(17);
// blink the LED
led.blink(2.0, 3.0);

// on_time = 2 secs, off_time=3 secs
led.blink(2.0,3.0);

// prevent program from exiting immediately
led.wait();
}

0 comments on commit 8f3bdc7

Please sign in to comment.