This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
while true; do | |
clear | |
echo "Battery and Temperature Information:" | |
echo "-----------------------------------" | |
echo "Capacity: $(cat /sys/class/power_supply/battery/capacity)%" | |
echo "Die Health: $(cat /sys/class/power_supply/battery/die_health)" | |
echo "Status: $(cat /sys/class/power_supply/battery/status)" | |
# Get voltage | |
microvolts=$(cat /sys/class/power_supply/battery/voltage_now) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const TuyAPI = require('tuyapi'); | |
const device = new TuyAPI({ | |
id: 'XXXXXXXXXXXXXXXXXXXX', | |
key: 'XXXXXXXXXXXXXXXX'}); | |
let stateHasChanged = false; | |
// Find device on network | |
device.find().then(() => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const TuyAPI = require('tuyapi'); | |
const device = new TuyAPI({ | |
id: 'XXXXXXXXXXXXXXXXXXXX', | |
key: 'XXXXXXXXXXXXXXXX'}); | |
let stateHasChanged = false; | |
// Find device on network | |
device.find().then(() => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
clear | |
echo -e "\e[32m~~~~Initial temps~~~~\e[39m" | |
/opt/vc/bin/vcgencmd measure_temp | |
for f in {1..10} | |
do | |
echo -e "\e[32m~~~~Starting run" $f"~~~~\e[39m" | |
sysbench --test=cpu --cpu-max-prime=2 --num-threads=4 run > /dev/null 2>&1 |