plugmate-thermal-throttle-check-8.ino
Thermal monitoring script via sysfs for MediaTek SoC.
PlugMate is passive and very compact, thermal management is critical. This script reads standard Linux thermal zones (MTK8195/8168 drivers). Execution requires root privileges or ADB shell with sysfs node access. Run in background to prevent overheating.
plugmate-thermal-throttle-check-8.ino
#!/bin/bash
# Surveillance thermique du SoC MediaTek Helio G80
# Le format clé USB risque la montée en température
THRESHOLD=85000 # Température seuil en milli-degrés
TEMP_PATH="/sys/class/thermal/thermal_zone*/temp"
echo "Surveillance thermique du PlugMate..."
while true; do
MAX_TEMP=0
for file in $TEMP_PATH; do
if [ -f "$file" ]; then
TEMP=$(cat "$file")
if [ $TEMP -gt $MAX_TEMP ]; then
MAX_TEMP=$TEMP
fi
fi
done
if [ $MAX_TEMP -gt $THRESHOLD ]; then
echo "ALERTE : Température critique $((MAX_TEMP/1000))°C ! Réduction de fréquence..."
# Tentative de réduction de fréquence CPU (nécessite root/system partition writable)
echo 1600000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq 2>/dev/null
else
echo "Température : $((MAX_TEMP/1000))°C (OK)"
fi
sleep 5
done