Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédenteDernière révisionLes deux révisions suivantes | ||
ressources:odroid_n2 [2023/04/12 16:01] – [Machine sonore] jeff | ressources:odroid_n2 [2023/08/23 17:30] – [Premier capteur weather board] jeff | ||
---|---|---|---|
Ligne 71: | Ligne 71: | ||
apt install xserver-xorg-core xserver-xorg-input-libinput xinit dbus-x11 xfonts-base x11-xserver-utils x11-utils libgl1-mesa-dri mesa-utils mesa-utils-extra | apt install xserver-xorg-core xserver-xorg-input-libinput xinit dbus-x11 xfonts-base x11-xserver-utils x11-utils libgl1-mesa-dri mesa-utils mesa-utils-extra | ||
apt install vim fluxbox xterm xfonts-base x11-xserver-utils | apt install vim fluxbox xterm xfonts-base x11-xserver-utils | ||
- | apt install pcmanfm xpad avahi-daemon # options | + | apt install pcmanfm xpad avahi-daemon |
mkdir -p / | mkdir -p / | ||
echo " | echo " | ||
</ | </ | ||
< | < | ||
+ | **startfluxbox** | ||
echo " | echo " | ||
# fluxbox startup-script: | # fluxbox startup-script: | ||
Ligne 85: | Ligne 87: | ||
xterm -T ' | xterm -T ' | ||
+ | ##lancement installation sonore | ||
+ | / | ||
+ | # | ||
+ | wmnd & | ||
+ | wmmisc & | ||
+ | # | ||
+ | |||
/ | / | ||
exec fluxbox -log ~/ | exec fluxbox -log ~/ | ||
Ligne 90: | Ligne 99: | ||
chmod 755 / | chmod 755 / | ||
</ | </ | ||
- | menu fluxbox ./ | + | **menu fluxbox** ./ |
< | < | ||
[begin] (Fluxbox) | [begin] (Fluxbox) | ||
[exec] (Bash) { / | [exec] (Bash) { / | ||
+ | [exec] (alsamixergui) {alsamixergui -c1} <> | ||
+ | [exec] (start.sh) {~/ | ||
+ | [exec] (stop.sh) {~/stop.sh} <> | ||
+ | [exec] (enregistre volumes) {alsactl store 1 -f ~/ | ||
+ | [exec] (restore volumes) {alsactl restore 1 -f ~/ | ||
[exec] (ROX) {rox-filer} <> | [exec] (ROX) {rox-filer} <> | ||
Ligne 137: | Ligne 151: | ||
de https:// | de https:// | ||
Connexion sur 1-3V 2->SDA 3->SDC 9->GND | Connexion sur 1-3V 2->SDA 3->SDC 9->GND | ||
+ | |||
+ | – Sensors : BME280, Si1132 | ||
< | < | ||
Ligne 147: | Ligne 163: | ||
</ | </ | ||
{{ : | {{ : | ||
+ | |||
+ | ajout d'un code python pour la transmission MQTT des données, en utilisant juste un popen | ||
+ | <code python> | ||
+ | import os | ||
+ | cputemp = float(os.popen(' | ||
+ | 1000 | ||
+ | broker_address = " | ||
+ | broker_port = 1883 | ||
+ | topicbase = " | ||
+ | client_id = " | ||
+ | username = ' | ||
+ | password = ' | ||
+ | |||
+ | client = mqtt.Client(client_id) | ||
+ | client.username_pw_set(username, | ||
+ | client.connect(broker_address, | ||
+ | |||
+ | topic = topicbase + "/ | ||
+ | client.publish(topic, | ||
+ | time.sleep(1) | ||
+ | |||
+ | </ | ||
+ | <code c> | ||
+ | |||
+ | </ | ||
+ | import os | ||
+ | import time | ||
+ | from paho.mqtt import client as mqtt_client | ||
+ | |||
+ | cputemp = float(os.popen(' | ||
+ | 1000 | ||
+ | broker_address = " | ||
+ | broker_port = 1883 | ||
+ | topicbase = " | ||
+ | client_id = " | ||
+ | username = ' | ||
+ | password = ' | ||
+ | |||
+ | client = mqtt_client.Client(client_id) | ||
+ | client.username_pw_set(username, | ||
+ | client.connect(broker_address, | ||
+ | |||
+ | topic = topicbase + "/ | ||
+ | client.publish(topic, | ||
+ | time.sleep(1) | ||
+ | |||
===== Machine sonore ===== | ===== Machine sonore ===== | ||
Serveur son : Jack2 \\ | Serveur son : Jack2 \\ | ||
Ligne 160: | Ligne 222: | ||
apt install qjackctl jack-tools aj-snapshot zita-njbridge alsamixergui | apt install qjackctl jack-tools aj-snapshot zita-njbridge alsamixergui | ||
</ | </ | ||
- | ==== Puredata vanilla ==== | + | ==== installation |
pour optimiser au maximum, nous laisserons les patch en no-gui donc la partie graph ne sera utile que pour la mise au point\\ | pour optimiser au maximum, nous laisserons les patch en no-gui donc la partie graph ne sera utile que pour la mise au point\\ | ||
Ligne 179: | Ligne 241: | ||
pd-slip pd-smlib pd-syslog pd-tclpd pd-testtools pd-unauthorized pd-upp \ | pd-slip pd-smlib pd-syslog pd-tclpd pd-testtools pd-unauthorized pd-upp \ | ||
pd-vbap pd-wiimote pd-windowing pd-xbee pd-xsample pd-zexy pdal | pd-vbap pd-wiimote pd-windowing pd-xbee pd-xsample pd-zexy pdal | ||
+ | </ | ||
+ | ==== Installation de pdnext ==== | ||
+ | pd-vanilla a un gros défaut, c'est de ne pas être multi-thread ! du coup ne cherchant un peu j'ai trouvé https:// | ||
+ | Cela résout le problème et permet de ne pas utiliser pd-l2ork avec nw et ses besoins en ressource plus importante voir son inexistence en ARMv8 ... | ||
+ | |||
+ | du coup | ||
+ | <code c> | ||
+ | cd /usr/src | ||
+ | git clone https:// | ||
+ | cd pdnext | ||
+ | ./ | ||
+ | ./configure --disable-jack-framework --enable-jack --disable-portaudio --prefix=/ | ||
+ | make -j4 | ||
+ | make install | ||
+ | </ | ||
+ | Ensuite il faut peut etre recompiler certain paquet pd genre zexy | ||
+ | <code c> | ||
+ | apt source pd-zexy | ||
+ | cd pd-zexy_labonne_version | ||
+ | ./configure --prefix=/ | ||
+ | make | ||
+ | make install | ||
+ | </ | ||
+ | ==== Scripts sonores ==== | ||
+ | **Arret** | ||
+ | < | ||
+ | #!/bin/bash | ||
+ | # stop.sh , kill jack et pd | ||
+ | # limite les doubles cliques | ||
+ | if [ -f / | ||
+ | # | ||
+ | for i in `ps -e|grep pd|awk ' | ||
+ | for i in `ps -e|grep jack|awk ' | ||
+ | for i in `ps -e|grep qjackctl|awk ' | ||
+ | # | ||
+ | date > / | ||
+ | # | ||
+ | # limite les doubles cliques | ||
+ | sleep 5 | ||
+ | rm / | ||
+ | exit 0 | ||
+ | </ | ||
+ | **Lancement** | ||
+ | |||
+ | **.fluxbox/ | ||
+ | < | ||
+ | #!/bin/bash | ||
+ | # rapidestart.sh lancement qjackctl puredata | ||
+ | # | ||
+ | # lancement capteur OSC | ||
+ | python3 / | ||
+ | # jackd | ||
+ | alsactl restore 1 -f ~/ | ||
+ | qjackctl & | ||
+ | date > /tmp/start | ||
+ | cd /root/Pd | ||
+ | pd -jack / | ||
+ | |||
+ | exit 0 | ||
+ | </ | ||
+ | **start.sh** | ||
+ | < | ||
+ | #!/bin/bash | ||
+ | # start.sh lancement qjackctl puredata | ||
+ | # limite les doubles cliques | ||
+ | if [ -f / | ||
+ | # | ||
+ | for i in `ps -e|grep pd|awk ' | ||
+ | for i in `ps -e|grep jack|awk ' | ||
+ | for i in `ps -e|grep qjackctl|awk ' | ||
+ | #restore volume enregistré par alsactl store 1 | ||
+ | alsactl restore 1 -f ~/ | ||
+ | qjackctl & | ||
+ | date > / | ||
+ | sleep 4 | ||
+ | pd -jack & | ||
+ | # | ||
+ | # limite les doubles cliques | ||
+ | sleep 10 | ||
+ | rm / | ||
+ | |||
+ | exit 0 | ||
</ | </ |