Raspberry pi 3 temperature check code in python
// tempChecker.py
import os
import time
def TempCheck():
temp = os.poepn('vcgencmd measure_temp').readline()
return (temp.replace('temp=',''))
times = time.strftime('%Y/%m/%D %H:%M:%S')
print( times +"==>" + TempCheck())
// bash
crontab -e
// 10 Minute run python
*/10 * * * * python /home/pi/TempChecker.py >> /home/pi/TemperatureLog.txt
// Minute | Houre | day(Month) | Month | day(Week)
[Raspberry pi 3 ]Python GUI script executed by direct click (0) | 2020.01.02 |
---|---|
라즈베리파이 기본 , 구성 (1) | 2019.11.20 |
Raspberry pi 3 UVC camera (USB webcam ) (0) | 2019.01.21 |
Raspberry pi 3 how to use pi camera ? (31) | 2018.11.21 |