Just take imageusb.exe to create an image file of you micro SD card.
Best regards

I know how to create an img file but not sure what img you are afterAll4linux a écrit :@Rikrado,
Just take imageusb.exe to create an image file of you micro SD card.
Best regards
Code : Tout sélectionner
dd bs=1M if=/dev/sdX of=/chemin_stockage_image/<nom_de_votre_backup>.img
Code : Tout sélectionner
tar -zcvf <nom_de_votre_backup>.img.tar.gz <nom_de_votre_backup>.img
Code : Tout sélectionner
dd bs=1M if=/dev/sdX of=/path_to_stock_image/<name_of_backup>.img
Code : Tout sélectionner
-zcvf tar <name_of_backup>.img.tar.gz <name_of_backup>.img
Code : Tout sélectionner
crontab -e
Code : Tout sélectionner
@reboot sudo bash /home/pi/sds.sh &
Code : Tout sélectionner
gpio mode 7 out
gpio write 7 1
Code : Tout sélectionner
gpio -g mode 4 out
gpio -g write 4 1
Code : Tout sélectionner
gpio mode 7 out
gpio write 7 1
Code : Tout sélectionner
gpio -g mode 4 out
gpio -g write 4 1
Code : Tout sélectionner
> cd /home/volumio
> wget https://archive.raspberrypi.org/debian/pool/main/r/rpi.gpio/python-rpi.gpio_0.6.3~jessie-1_armhf.deb
> dpkg -i python-rpi.gpio_0.6.3~jessie-1_armhf.deb
Code : Tout sélectionner
> gpio -g readall
Pensez à rendre votre fichier exécutable:#!/bin/bash
#Gestion du bouton d'alimentation
echo "Audiophonics Shutdown script starting..."
echo "Asserting pins : "
echo "ShutDown : GPIO17=in, set to Low"
echo "BootOK : GPIO22=out, set to High"
gpio -g mode 17 in
gpio -g write 17 0
gpio -g mode 22 out
gpio -g write 22 1
while [ 1 ]; do
if [ "$(gpio -g read 17)" = "1" ]; then
echo "ShutDown order received, RaspBerry pi will now enter in standby mode..."
sudo shutdown -h -P now
break
fi
/bin/sleep 0.25
done
exit 0
Code : Tout sélectionner
> sudo chmod 755 /home/volumio/sds.sh
Code : Tout sélectionner
sudo nano /etc/init.d/sdsd
On chance les flags:#!/bin/sh
### BEGIN INIT INFO
# Provides: sdsd
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: ON/OFF switch
# Description: This deamon is used to monitor the ON/OFF button state via GPIO
### END INIT INFO
# Change the next 3 lines to suit where you install your script and what you want to call it
DIR=/home/volumio
DAEMON=$DIR/sds.sh
DAEMON_NAME=sdsd
# Add any command line options for your daemon here
DAEMON_OPTS=""
# This next line determines what user the script runs as.
# Root generally not recommended but necessary if you are using the Raspberry Pi GPIO from Python.
DAEMON_USER=volumio
# The process ID of the script when it runs is stored here:
PIDFILE=/var/run/$DAEMON_NAME.pid
. /lib/lsb/init-functions
do_start () {
log_daemon_msg "Starting system $DAEMON_NAME daemon"
start-stop-daemon --start --background --pidfile $PIDFILE --make-pidfile --user $DAEMON_USER --chuid $DAEMON_USER --startas $DAEMON -- $DAEMON_OPTS
log_end_msg $?
}
do_stop () {
log_daemon_msg "Stopping system $DAEMON_NAME daemon"
start-stop-daemon --stop --pidfile $PIDFILE --retry 10
log_end_msg $?
}
case "$1" in
start|stop)
do_${1}
;;
restart|reload|force-reload)
do_stop
do_start
;;
status)
status_of_proc "$DAEMON_NAME" "$DAEMON" && exit 0 || exit $?
;;
*)
echo "Usage: /etc/init.d/$DAEMON_NAME {start|stop|restart|status}"
exit 1
;;
esac
exit 0
Code : Tout sélectionner
sudo chmod 755 /etc/init.d/sds
Code : Tout sélectionner
sudo update-rc.d sdsd defaults
Je n'avais pas connaissance de ce Plugin ! C'est super pour le RASPDAC avec ecran OLEDJedS a écrit :Bonjour,
J'ai développé un plugin pour Volumio 2 permettant de gérer le bouton power ainsi que l’écran LCD du Raspdac V3.
Le plugin se trouve ici :
https://github.com/JedS/Raspdac/release ... .0.0.2.zip
Le digione nécéssite de déplacer le GPIO 17 en modifiant le pin correspondant dans chaque script python.Fred75000 a écrit :Bonjour,
J'utilise un Allo DigiOne sur Pi3
Je me demande si ce module peut fonctionner avec mon hardware ou alors si il est seulement utilisable avec un I-Sabre ?
je veux juste pouvoir éteindre le Pi3 avec un bouton..
En vous remerciant par avance.
Le DigiOne n'utilise que 8 pin sur 40