Control a fan attached to a GPIO via NPN transistor (defaults to GPIO 14 (pin 8))
For more info see https://ograblog.wordpress.com/2019/10/09/attaching-a-cpu-fan-to-a-rpi-running-ubuntu-core/
Make sure to connect the snap interface for the correct GPIO that your fan is attached to (see https://pinout.xyz for correct mapping)
snap connect pi-fancontrol:gpio pi:bcm-gpio-14
The snap allows a few configurations to be set
Pick a different GPIO to swithc the fan on/off (do not forget to use the above connect command to enable access to this changed GPIO)
snap set pi-fancontrol gpio=23
Set the temperature threshold (in degrees celsius) at which the fan turns on
snap set pi-fancontrol threshold=40
Set the interval (in seconds) at which the temperature gets scanned
snap set pi-fancontrol interval=60
Indeed you can set all these also from a gadget.yaml file in the ```defaults:``` section.
Thank you for your report. Information you provided will help us investigate further.
There was an error while sending your report. Please try again later.
Snaps are applications packaged with all their dependencies to run on all popular Linux distributions from a single build. They update automatically and roll back gracefully.
Snaps are discoverable and installable from the Snap Store, an app store with an audience of millions.
Snapd can be installed from Manjaro’s Add/Remove Software application (Pamac), found in the launch menu. From the application, search for snapd, select the result, and click Apply.
Alternatively, snapd can be installed from the command line:
sudo pacman -S snapd
Once installed, the systemd unit that manages the main snap communication socket needs to be enabled:
sudo systemctl enable --now snapd.socket
To enable classic snap support, enter the following to create a symbolic link between /var/lib/snapd/snap
and /snap
:
sudo ln -s /var/lib/snapd/snap /snap
Either log out and back in again, or restart your system, to ensure snap’s paths are updated correctly.
To install pi-fancontrol, simply use the following command:
sudo snap install pi-fancontrol
Browse and find snaps from the convenience of your desktop using the snap store snap.
Interested to find out more about snaps? Want to publish your own application? Visit snapcraft.io now.