Voici comment j'ai fait pour le RASPDAC et moOde 4.2 avec les affichage du script audiophonics Pydpiper-Raspdac
je n'ai aucun mérite ce n'est qu'une synthese de ce que j'ai plus glaner ici et là , vous aurez le mème ecran que dans la version Volumio de audiophonics
dès que j'ai un moment je poste l'image
installer d'abord moOde 4.2 en n'oubliant pas de créer un fichier vide nommé SSH à la racine
ouvrir une cession SSH avec pi et moodeaudio
et taper ces lignes de commande:
Afficheur oled raspdac dans moode 4.2
Code:
cd /home/pi
git clone https://github.com/dhrone/pydPiper" onclick="window.open(this.href);return false;
cd /home/pi/pydPiper
Code:
./install_docker.sh
Code:
wget https://raw.githubusercontent.com/audio ... dPiper.cfg" onclick="window.open(this.href);return false;
wget https://raw.githubusercontent.com/audio ... ac_16x2.py" onclick="window.open(this.href);return false;
Code:
sudo python configure.py
Startup mode duration (in seconds)? [5]: 5
DISPLAY CONFIGURATION
Display type?: winstar_weg
Register select pin? [7]: 7
Enable pin? [8]: 8
Data 4 pin? [25]: 25
Data 5 pin? [24]: 24
Data 6 pin? [23]: 23
Data 7 pin? [27]: 27
Width of display (in pixels)? [80]: 80
Height of display (in pixels)? [16]: 16
Enable pulse duration (in microseconds)? [0.1]: 0.1
Location of the pagefile? [pages_lcd_16x2.py]: pages_raspdac_16x2.py
Animation Smoothing (in seconds)? [0.15]: 0.15
SYSTEM CONFIGURATION
Location of log file? [/var/log/pydPiper.log]: /var/log/pydPiper.log
Logging Level? [info]: info
Time Zone? [US/Eastern]: Europe/Paris
24-hour clock? [True]: true
Temperature Scale? [fahrenheit]: celsius
Enable weather? [n]: n
MUSIC DISTRIBUTION
Name of distribution? [volumio]: moode
Server address? [localhost]: localhost
Port? [3000]: 6600
Code:
wget https://raw.githubusercontent.com/audio ... er.service" onclick="window.open(this.href);return false;
Code:
sudo nano pages_raspdac_16x2.py
Dans la section "sequence" remplacer tous les stream par encoding dans db['stream'] pour avoir db['encoding']
sauvegarder et sortir (ctrl-x, yes, enter
Démarrage des scripts
Code:
sudo cp pydpiper.service /etc/systemd/system
sudo systemctl enable pydpiper
sudo systemctl start pydpiper
[/color]
bouton
1 / Installation de WiringPi:
pour que WiringPi communique avec les pins du GPIO.
Installation de GCC
Code:
sudo apt-get install gcc
maintenant dans wiringPi:
Code:
cd /home/pi
git clone git://git.drogon.net/wiringPi" onclick="window.open(this.href);return false;
cd wiringPi
./build
maintenant lecture du GPIO
Code:
gpio readall
2 / Création du script du power button:
se placer dans /home/pi
Code:
cd /home/pi
Importation du script
Code:
wget https://raw.githubusercontent.com/audio ... ter/sds.sh" onclick="window.open(this.href);return false;
3 / Add the script button at startup: Editing the startup file:
Now edit rc.local. This will make the script run at startup.
Code:
sudo nano /etc/rc.local
Add this line before "exit 0”. Don’t delete or change anything else in this file, just add the extra line.
Code:
sudo bash /home/pi/sds.sh &
4 / Creating command scripts for moOde restart and shutdown:
softshutdown recovery script:
Code:
sudo wget https://raw.githubusercontent.com/audio ... hutdown.sh" onclick="window.open(this.href);return false;
softreboot recovery script:
Code:
sudo wget https://raw.githubusercontent.com/audio ... treboot.sh" onclick="window.open(this.href);return false;
I don’t know if the scripts need to be executable, but I don’t think it can hurt to do so:
Code:
sudo chmod +x sds.sh
sudo chmod +x softshutdown.sh
sudo chmod +x softreboot.sh
5 / Make moOde work with the scripts.
First make a backup of the original worker.php file in case you mess things up:
Code:
cd /var/www/command
sudo cp worker.php worker.sav
We can now edit the original:
Code:
sudo nano worker.php
Search for ‘reboot’ until you find the part that reads this:
Code:
case 'reboot':
sysCmd('mpc stop');
sysCmd('systemctl stop nginx');
sysCmd('reboot');
break;
case 'poweroff':
sysCmd('mpc stop');
sysCmd('systemctl stop nginx');
sysCmd('poweroff');
break;
Here we will replace the reboot and poweroff commands with the scripts that now reside in /home/pi.
Change the text so it reads:
Code:
case 'reboot':
sysCmd('mpc stop');
sysCmd('systemctl stop nginx');
sysCmd('sudo bash /home/pi/softreboot.sh');
break;
case 'poweroff':
sysCmd('mpc stop');
sysCmd('systemctl stop nginx');
sysCmd('sudo bash /home/pi/softshutdown.sh');
break;
Reboot the Pi and if all goes well your LED should stop blinking and you should be able to power down with the button as well as through the moOde web UI.