The GPIO shield features:
The three pins labelled jumper should be used to decide whether the Darlington array will operate at 5Vdc (connecting middle with lower pin) or 3.3Vdc (connecting middle with upper pin). Keep in mind that the GPIO can output no more than 50mA per pin. If a larger load is needed, the Darlington should operate on an external 5V source that can be connected to the two pins labeled 5V on the bottom left corner: this can also be used to power the raspberryPI itself by soldering the solder-jumper on the reverse of the board. The Vcc for the I2C connector can also be chosen between 3.3V and 5V soldering the appropriate connections together. The connector labelled as ribbon mirrors the first 6 pins of the GPIO and can be used to connect the ribbon cable that goes to the lightbox.
The board is controlled by the GPIO.py
script (github) which is launched independently by its own process service ethoscope_GPIO_listener.service
. The service listens for buttons 33 and 37 and associates the following actions:
33 [short press] →ethoclient -c stop
; 33 [long press] → poweroff
;
37 [short press] → systemctl restart ethoscope_device
; 37 [long press] → reboot
;
Long press means at least 3 seconds. These are the default actions which are defined initially in the code and can be customised by altering the content of /etc/gpio.conf
on the machine.