Hi,
I can do the first part (wire a "off" push button)
Here is a GPIO map - We can use pins that are not marked with a red dot :
![[Image: rpi_hiffiberrydac_gpio.jpg]](https://www.developpez.net/forums/attachments/p594023d1616425277/general-developpement/programmation-systeme/embarque/raspberry-pi/extinction-propre-complete-l-alimentation/rpi_hiffiberrydac_gpio.jpg/)
Please mind that other Hifi DAC can use differents GPIO pins !
Then, turn Raspberry Pi ON
Connect to the PI with SSH :
- Run PuTTY on your computer
- login "pi"
- password "moodeaudio"
Then, open and edit /boot/config.txt (https://www.makeuseof.com/tag/edit-boot-...pberry-pi/)
- enter "cd /"
- enter "ls"
- enter "cd /boot"
- enter "sudo nano config.txt"
- add a line "dtoverlay=gpio_shutdown,gpio_pin=23"
(I use GPIO 23 that is pin 16 to connect my "off" push button)
NB: verr num key may not work... so that to type numbers and "-" use keys on top of QWERTY
- enter CTRL+X to save
- enter "exit" to close PuTTY
Then shut down the PI with the shutdown menu of the Moode Audio web interface
Thus, you can plug the "off" push button between the pin 16 and ground
When I turn on again the PI, the push button makes the PI shutdown properly
It works also when Moode Audio is playing music.
The first part is done
I have to do the next part : find or generate an electronic signal to said PI is ready to power down - I don't know how to do that...![Blush Blush](https://moodeaudio.org/forum/images/smilies/blush.png)
Regards
I can do the first part (wire a "off" push button)
![Smile Smile](https://moodeaudio.org/forum/images/smilies/smile.png)
Here is a GPIO map - We can use pins that are not marked with a red dot :
![[Image: rpi_hiffiberrydac_gpio.jpg]](https://www.developpez.net/forums/attachments/p594023d1616425277/general-developpement/programmation-systeme/embarque/raspberry-pi/extinction-propre-complete-l-alimentation/rpi_hiffiberrydac_gpio.jpg/)
Please mind that other Hifi DAC can use differents GPIO pins !
Then, turn Raspberry Pi ON
Connect to the PI with SSH :
- Run PuTTY on your computer
- login "pi"
- password "moodeaudio"
Then, open and edit /boot/config.txt (https://www.makeuseof.com/tag/edit-boot-...pberry-pi/)
- enter "cd /"
- enter "ls"
- enter "cd /boot"
- enter "sudo nano config.txt"
- add a line "dtoverlay=gpio_shutdown,gpio_pin=23"
(I use GPIO 23 that is pin 16 to connect my "off" push button)
NB: verr num key may not work... so that to type numbers and "-" use keys on top of QWERTY
- enter CTRL+X to save
- enter "exit" to close PuTTY
Then shut down the PI with the shutdown menu of the Moode Audio web interface
Thus, you can plug the "off" push button between the pin 16 and ground
When I turn on again the PI, the push button makes the PI shutdown properly
It works also when Moode Audio is playing music.
The first part is done
![Smile Smile](https://moodeaudio.org/forum/images/smilies/smile.png)
I have to do the next part : find or generate an electronic signal to said PI is ready to power down - I don't know how to do that...
![Blush Blush](https://moodeaudio.org/forum/images/smilies/blush.png)
Regards