Tags
Pages dans la catégorie :
Tags
Pages dans la catégorie :
Ceci est une ancienne révision du document !
C'est un vrai petit PC, il intègre 'Petitboot' sorte de BIOS comme sur un PC. Elle va nous servir comme serveur agri-culturel dans une des serres, à la fois pour la création sonore utilisant les capteurs présents et à l'aide, la surveillance des cultures.
On commence à travers la liaison série
apt update; apt upgrade -y dpkg-reconfigure tzdata dpkg-reconfigure locales apt install odroid-wiringpi odroid-wiringpi-python vim git journalctl --vacuum-size=1M echo "SystemMaxUse=5M" >> /etc/systemd/journald.conf
Connexion du bouton sur 9/11
ajouter dans /media/boot/boot.ini dans la section Boot Args juste apres la ligne bootargs en surcharge
### in case of GPIOX.3 (Pin 11) of 2x20 pins connector setenv gpiopower "479" setenv bootargs ${bootargs} gpiopower=${gpiopower}
apt remove lightdm # si besoin? apt install nodm
modifier /etc/default nodm pour loger l'utilisateur odroid et pas root
# nodm configuration # Set NODM_ENABLED to something different than 'false' to enable nodm NODM_ENABLED=true # User to autologin for NODM_USER=odroid # First vt to try when looking for free VTs NODM_FIRST_VT='7' # X session NODM_XSESSION=/usr/bin/startfluxbox # Options for nodm itself NODM_OPTIONS= # Options for the X server. # Format: [/usr/bin/<Xserver>] [:<disp>] <Xserver-options> # The Xserver executable and the display name can be omitted, but should # be placed in front, if nodm's defaults shall be overridden. NODM_X_OPTIONS='-nolisten tcp' # If an X session will run for less than this time in seconds, nodm will wait an # increasing bit of time before restarting the session. NODM_MIN_SESSION_TIME=60 # Timeout (in seconds) to wait for X to be ready to accept connections. If X is # not ready before this timeout, it is killed and restarted. NODM_X_TIMEOUT=300
..j'ai cherché longtemps le truc de remplacer Xsession par startfluxbox … pour avoir une compatibilité maximale et surtout le lancement automatique par le fichier .fluxbox/startup !
Un bureau fluxbox minimaliste consommant moins de 300Mo (mieux que les 800 de mate ou 600 de xfce),
sous root pour minimiser les temps de latence (attention aux connexion…)
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 pcmanfm xpad avahi-daemon # options mkdir -p /root/.fluxbox echo "startfluxbox" > /root/.xsession
echo " # fluxbox startup-script: # ~/.fluxbox/startup # Lines starting with a '#' are ignored. # doit finir par exec fluxbox #fbsetbg -l fbsetroot -solid black xterm -T 'Top' -e /usr/bin/top & /root/.fluxbox/x11vnc.sh 2>&1 > /tmp/x11vnc.log & exec fluxbox -log ~/.fluxbox/fluxbox.log " > /root/.fluxbox/startup chmod 755 /root/.fluxbox/startup
menu fluxbox ./fluxbox/menu
[begin] (Fluxbox) [exec] (Bash) { /usr/bin/xterm -T "Bash" -e /bin/bash --login} <> [exec] (ROX) {rox-filer} <> [exec] (Xkill) {xkill} <> [exec] (Xrefresh) {xrefresh} <> [submenu] (Monitoring) {} [exec] (Pstree) { xterm -T "Pstree" -e /usr/bin/pstree.x11} </usr/share/p ixmaps/pstree16.xpm> [exec] (Top) { xterm -T "Top" -e /usr/bin/top} <> [exec] (Top) { xterm -T "HTOP" -e /usr/bin/htop} <> [exec] (Xconsole) {xconsole -file /dev/xconsole} <> [exec] (Xload) {xload} <> [end] [submenu] (Styles) {} [stylesdir] (/usr/share/fluxbox/styles) [stylesdir] (~/.fluxbox/styles) [end] [config] (Configuration) [workspaces] (Workspaces) [reconfig] (Reconfigure) [restart] (Restart) [exec] (Power Off) {sudo /sbin/shutdown -h now} [exec] (Reboot) {sudo /sbin/shutdown -r now} [exit] (Exit) [end]
apt install x11vnc avahi-daemon x11vnc -storepasswd votre_mot_de_passe ~/.vnc_passwd echo " sleep 3 /usr/bin/x11vnc -rfbauth /root/.vnc_passwd -geometry 1024x780 \ -reopen -bg -avahi -forever -display :0 exit 0 " >/root/.fluxbox/x11vnc.sh
de https://wiki.odroid.com/odroid-n2/application_note/software/weather_board avec pour nous une sortie OSC
apt install i2c-tools libi2c-dev python3-smbus phyton3-liblo cd /usr/src git clone https://github.com/hardkernel/WEATHER-BOARD.git cp -a ./WEATHER-BOARD/python_weather/* /usr/local/bin/ chmod 755 /usr/local/bin/BME280.py /usr/local/bin/SI1132.py /usr/local/bin/weather_board.py