The Raspberry Pi GPIO driver allows you to control up to five GPIO pins on a Raspberry Pi. Typically, each GPIO pin is connected to an opto-isolator circuit or Raspberry Pi hat to control larger voltages and currents.
The driver uses the pigpio library at http://abyz.me.uk/rpi/pigpio/
On Ubuntu systems install with:
sudo add-apt-repository ppa:mutlaqja/ppa
sudo apt-get update
sudo apt-get install indi-rpi-gpio
This installs the indi_rpi_gpio driver and the pigpiod daemon which runs as a systemd service pigpiod.service. This service is installed by default on Raspbian systems and is replaced when the driver is installed. There should be no functional difference between the default service installed by Raspbian and the one installed by the driver.
The pigpiod service uses about 2% of CPU (8% of one core) depending on the type of Raspberry Pi. You can disable the service till next reboot with:
sudo systemctl stop pigpiod.service
Or disable permanently with
sudo systemctl disable pigpiod.service
Up to five ports can be assigned a GPIO pin to control.
Note that GPIO pins are numbered by their GPIO (aka BCM) number per the Raspberry Pi pinout diagram and NOT by their physical pin number on the header. e.g. GPIO 3 is physical pin 5 on the Raspberry Pi 4.
Each port can be configured to be:
Not used
A simple on/off switch (active high)
A Pulse Width Modulation (PWM) control. This is normally how variable level output is controlled for things like LED panels, dew heaters etc.
The pulse frequency is set at 1000Hz. The duty cycle can be set between 0% and 100%
A series of timed pulses. This is typically used for actuating a DSLR shutter in Bulb mode.
The driver lets you set pulse length, number of pulses and delay between pulses.
Pulse length can be set between 0 to 3600 seconds. Below 5 seconds pulse length can be set in 0.1 second increments.
Delay can be set between 0 to 60 seconds. Below 5 seconds delay can be set in 0.1 second increments.
Number of pulses can be between 0 to 500.
Each port can be configured as Active High or Active Low
A label can be set for each port for easy identification
On the GPIO Config tab
Select the GPIO number for each port or Not in use of it is not used
Select the type of port: On/Off, PWM, Timer or None if it is inactive
If the port is a PWM type, set the duty cycle
If the port is a Timer type set the timing parameters on the Timer Config page
Set the Duration of the switch on time in seconds
Set the Count for the number of times the port switches on
Set the Delay between the port being switched off and switched on. The delay also applies before the first swi