#!/bin/bash
# Boot script with button-controlled screen cycling
# sudo chmod +x /var/www/moduleair_pro_4g/services/matrix_boot.sh
# sudo /var/www/moduleair_pro_4g/services/matrix_boot.sh

# to stop the service
# sudo systemctl stop moduleair-boot.service

echo "$(date) - Starting boot animation..."
sudo /var/www/moduleair_pro_4g/matrix/imageScreen/image_split_boot /var/www/moduleair_pro_4g/matrix/imageScreen/ModuleAir128x64.png

echo "$(date) - Boot animation done, starting button-controlled display..."
echo "$(date) - Press button on GPIO6 to cycle: Network -> All Sensors -> CO2+PM+Network -> Blank"
sudo python3 /var/www/moduleair_pro_4g/matrix/button_screen_controller.py

echo "$(date) - Button controller started"