Gpiod
This library serves to control the digital pins of the embedded GPIO.
Requirements
In order to execute Gpiod methods at your embedded device, you will need to have the libgpiod-dev package installed in your board. You can do that by entering the following command at the device's terminal:
$ sudo apt-get install libgpiod-devOutput
To activate and deactivate any external component the embedded board is to change the value of the GPIO pin that will activate it.


Input
In several embedded applications, it is necessary to receive digital signal from an external component such as sensors or even to activate another component indirectly.

Behind the Class
Methods
Type
Name
Description
Constructor
open(int chip)
Defines which GPIO bus will be used.
Construtor
line(int pin)
Defines which pin of GPIO bus will be used.
Void
requestOutput(String consumer, int defaultValue)
Names the pin, defines as output and the initial value.
Void
setValue(int value)
Changes pin value.
Void
requestInput(String consumer)
Names the pin and defines as input.
Int
getValue()
Returns pin status
Last updated
Was this helpful?