The Kumquat has various connectors with different functionalities. This document demonstrates how to use these connectors using gpiod's command-line tools.
Similar to X6, this connector provides four Digital I/Os along with one Ground (COM) connection. Both input (In) and output (Qn) are available on the same pins:
To control the digital I/Os connected to your board, we'll use gpiod's command-line tools along with gpiofind to dynamically locate the GPIO pins based on the In and Qn names.
For example, to set a Digital I/O pin to a specific value:
```sh
gpioset $(gpiofind Q1)=1
```
This command dynamically locates the GPIO pin associated with Digital I/O 1 (Q1) using gpiofind and then sets its value to high using gpioset.
Similarly, you can set the value of other Digital I/O pins:
```sh
gpioset $(gpiofind Q2)=0
```
This command sets the value of Digital I/O 2 (Q2) to low.
### Controlling Relays
To control the relays connected to your board, you can use `gpioset` in combination with gpiofind.
For example, to turn on Relay 1 (connected to Q9), you can use:
```sh
gpioset $(gpiofind Q9)=1
```
To turn it off:
```sh
gpioset $(gpiofind Q9)=0
```
### Reading Digital Inputs
You can also read the state of digital inputs using `gpioget`.
For example, to monitor the state of Digital Input 1 (connected to I1), you can use: