Module GPIO
The class that's used to create and manage GPIO instances.
Info:
- Copyright: Debaru Kft. 2017
- Release:
- License: GNU
- Author: Debaru Kft
Functions
| Gpio (pin) | Creates a Gpio instance. |
| setup (is_output) | Sets the direction of the pin. |
| read () | Reads the supplied pin. |
| set (state) | Writes the suppliead state to the selected pin. |
Functions
- Gpio (pin)
-
Creates a Gpio instance.
Currently on Regor: Error LED:111, DO1:47, DO2:46, DO3:45, DO4:44, DI1: 27, DI2:26, DI3:23, DI4:22
Parameters:
- pin int
- setup (is_output)
-
Sets the direction of the pin.
Returns 0 on success, -1 on error.
Parameters:
- is_output bool
Returns:
- read ()
-
Reads the supplied pin. Returns 0 if off, 1 if on, -1 on error.
Returns:
- set (state)
-
Writes the suppliead state to the selected pin. Returns 0 on success, -1 on error
Parameters:
- state bool
Returns: