![]() No selling, trading or requests for valuation.No self-promotion, advertising, begging, or surveys.No submissions about memes, jokes, meta, or hypothetical / dream builds.No titles that are all-caps, clickbait, PSAs, pro-tips or contain emoji.No submissions about retailer or customer service experiences. ![]() No submissions about sales, deals or unauthorized giveaways.No submissions about hardware news, rumors, or reviews.Please keep in mind that we are here to help you build a computer, not to build it for you. … and your fan should start to fire up every time your CPU temperature goes above 50 degrees….Submit Build Help/Ready post Submit Troubleshooting post Submit other post New Here? BuildAPC Beginner's Guide Live Chat on Discord Daily Simple Questions threads Snap connect pi-fancontrol:hardware-observe Snap connect pi-fancontrol:gpio pi4-devel:bcm-gpio-14 You can easily install it with: snap install pi-fancontrol The whole code for the pi-fancontrol snap can be found on github and there is indeed a ready made snap for you to use in the snap store at ![]() A simple fancontrol part that just copies the script into the snap package, and off we go ! Now we need a very simple apps: entry that spawns the script as a daemon, allows it to access the info about temperature via the hardware-observe interface and also allows it to write to the gpio interface we connect the snap to, to echo the 0/1 values into the sysfs node for the GPIO. It is very specific to the Raspberry Pi, so we also add an architectures: block that makes it only build and run on arm images. ![]() The image is based on core18, so we add a base: core18 entry. Summary: Control a raspberry pi fan attached to GPIO 14Ĭontrol a fan attached to a GPIO via NPN transistorĬp -av fancontrol.sh $SNAPCRAFT_PART_INSTALL/ Since we run Ubuntu Core we indeed want to run the whole thing as a snap package, so lets quickly create a snapcraft.yaml file for it: name: pi-fancontrol So now I had an addon board that can cool the CPU, but the fan indeed needs some controlling software, this is easily done via some small shell script by echoing 0 or 1 into /sys/class/gpio/gpio14/value … this script can be found on my github account as fancontrol.sh Finished addon board (with pic how it gets attached) ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |