Struct rust_gpiozero::output_devices::LED [] [src]

pub struct LED { /* fields omitted */ }

Represents a light emitting diode (LED)

Example

Connect LED as shown below, with cathode(short leg) connected to GND

          Resistor     LED
 Pin 14 o--/\/\/---->|------o GND

extern crate rust_gpiozero;

use rust_gpiozero::*;

fn main() {
   let mut led = LED::new(14);
   led.blink(1,1);

 }

Methods

impl LED
[src]

[src]

Trait Implementations

impl Debug for LED
[src]

[src]

Formats the value using the given formatter. Read more

impl DigitalOutputDeviceTrait for LED
[src]

impl OutputDeviceTrait for LED
[src]

[src]

Get the pin

[src]

Turns the device on.

[src]

Turns the device off.

[src]

Reverse the state of the device. If it's on, turn it off; if it's off, turn it on. Read more

Auto Trait Implementations

impl Send for LED

impl Sync for LED