plugmate-thermal-throttle-check-8.ino
Script de monitoreo térmico vía sysfs para SoC MediaTek.
PlugMate es pasivo y muy compacto, la gestión térmica es crítica. Este script lee las zonas térmicas estándar de Linux (drivers MTK8195/8168). La ejecución requiere privilegios de root o shell ADB con acceso a nodos sysfs. Ejecutar en segundo plano para evitar sobrecalentamiento.
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