struct Pi::GPIOPin
- Pi::GPIOPin
- Struct
- Value
- Object
Defined in:
pi-gpio.crConstructors
Instance Method Summary
-
#as_input
Configures this GPIO pin for input.
-
#as_output
Configures this GPIO pin for output.
-
#high!
Sets this GPIO pin to 'High' voltage.
-
#high?(*args, **options)
Checks whether this GPIO pin is on 'High' voltage.
-
#high?(*args, **options, &)
Checks whether this GPIO pin is on 'High' voltage.
-
#low!
Sets this GPIO pin to 'Low' voltage.
-
#low?(*args, **options)
Checks whether this GPIO pin is on 'Low' voltage.
-
#low?(*args, **options, &)
Checks whether this GPIO pin is on 'Low' voltage.
-
#mode : Pi::GPIOPin::Mode
The operation mode of this GPIO pin.
- #mode=(m : Mode)
-
#mode=(mode : Pi::GPIOPin::Mode)
The operation mode of this GPIO pin.
-
#state
The current voltage at this GPIO pin: Either
High(3.3V) orLow(0V). -
#state=(value)
:ditto
Constructor Detail
Instance Method Detail
Configures this GPIO pin for output.
This is a shortcut for self.mode = Mode::Output.
Checks whether this GPIO pin is on 'High' voltage.
This is a shortcut for self.state.high?.
Checks whether this GPIO pin is on 'High' voltage.
This is a shortcut for self.state.high?.
Checks whether this GPIO pin is on 'Low' voltage.
This is a shortcut for self.state.low?.
Checks whether this GPIO pin is on 'Low' voltage.
This is a shortcut for self.state.low?.
The operation mode of this GPIO pin.
Initially set as Undefined, this property must be set to any
of the other available Modes prior to access.
The operation mode of this GPIO pin.
Initially set as Undefined, this property must be set to any
of the other available Modes prior to access.