Sound Monitor

PC

Prerequisite

sudo apt-get install netdiscover rrdtool cifs-utils
# generate ssh keys
ssh-keygen

gedit preferences → editor

tab width: 4
check insert spaces instead of tabs

Discover RADXA

sudo netdiscover
...
192.168.2.44 ac:a2:13:42:1c:14
...

Upload key to RADXA (password is rock)

ssh-copy-id 192.168.x.y

Connect

Connect to RADXA

# user rock, password rock
ssh rock@192.168.x.y

Graphs

Mount remote share

mkdir /tmp/monitor
sudo mount -t cifs -o uid=valerio,guest //192.168.2.44/monitor /tmp/monitor
cd /tmp/monitor

Edit

gedit /tmp/monitor/monitor/capture.py

Generate graph

ssh rock@192.168.2.44 monitor_graph

RADXA

radxa pro

battery CR1220 3V

Python monitor

Project is in /home/rock/monitor

run

sudo systemctl stop monitor
# start in foreground
monitor_run
# stop with CTRL+C

edit code

nano ~/monitor/monitor/capture.py

WIFI

nmcli device wifi connect <ssid> password <password>

Service

/etc/systemd/system/monitor.service

[Unit]
Description=Monitor
[Service]
Type=simple
User=rock
ExecStart=/usr/local/bin/monitor_run
[Install]
WantedBy=multi-user.target

Enable

systemctl enable monitor.service