1.how to use 1 gpio pin to drive raspberrypi power-on-off ... · tutorial 1 how to use 1 gpio pin...
Post on 25-Jul-2020
11 Views
Preview:
TRANSCRIPT
Tutorial www.52pi.com
1
Howtouse1GPIOPintodriveRaspberryPiPower-on-off-statuslightThedefaultindicatorlightofRaspberryPiistheredLEDlightnexttothepowerlight.Aslongastheraspberrypiispoweredon,itwilllightup.Itishardforustoknowwhethertheraspberrypiisonoroff.Itisevenhardertonoticethedifferencewhenyoufittheboardintoacase.Soifyouwanttoplacetheindicatorlightoutsidethecase,youmaycheckoutthistutorial.
ElectronicComponents:
1*RaspberryPi3ModelB1*RedLEDlight1*220Ohmresister1*Breadboard 2*Male/femaleDuPontJumpWire
InstallationDiagram:
ConnecttheGPIO26Pinsto220Ohmresistorfirst.Thenconnectittothereddiode.
Youmayrefertothisdetaileddiagram:
Tutorial www.52pi.com
2
ConfigurationModification:First thing first, run a command to boost the function of Device Tree which will enable yourraspberrypitobecompatiblewithmoredevices.Takealookattheuserguide:sudovim.tiny /boot/overlay/READMESearchforgpio-poweroff Poweroffmeans that the indicator lightwill not light upwhen the system is shutdown. You caneasliytelliftheraspberrypiisturnedoffproperlybycheckingtheindicatorlight.ThedefaultIOintheofficialusermanualisdefinedasIO26andthelatestsystemhasgotwiringPi.ItisveryeasyforyoutosetupandyoumaytakethissetupasthewarmupfortheApplicationKit.HereisthescreenshotfortheofficialREADME:
It is loaded by editing /boot/config.txt and by adding this command for module initialization:dtoverlay=gpio-poweroff,gpiopin=26,active_low Whenitisupdated,restarttheRaspberryPi:sudo sync sudo init 0Theindicatorwilllightupwhenthesystemisrunninganditwillbeturnedoffasthesystemisshutdown.Inthisway,youcaneasilytellthestatusoftheRaspberryPi.WhenyouDIYsomeinterestingapplications,youcanplacetheindicatoroutsidetoevaluatethestatusofthewholeoperation.
top related