文件名称:pi-thermometer:树莓派温度计
文件大小:5KB
文件格式:ZIP
更新时间:2024-07-19 20:21:09
Python
用于读取 DS18B20 数字温度传感器的 Raspberry Pi 代码,并发布到 cosm 所有有趣的东西都在 readTemp python 脚本中。 其他文件只是用于启动或保持运行的小脚本。 确保加载了单线驱动程序。 以下两行需要在 /etc/modules 中: w1_gpio w1_therm 在 Raspberry Pi 上,我将整个树复制到 /home/pi/pi-thermometer。 然后运行(以root身份): cp init.d/温度计/etc/init.d/ cp cron.d/checkup /etc/cron.d/ 如果您决定四处移动,则需要修复脚本文件中的路径。 init 脚本基于: : init.d/thermometer:init 脚本被放置在 /etc/init.d/ 目录中,确保它是可执行的并且由 root 拥有: -rwxr-x
【文件预览】:
pi-thermometer-master
----init.d()
--------thermometer(413B)
----cron.d()
--------checkup(50B)
----thermometer(62B)
----readTemp(3KB)
----README.md(3KB)
----therm.cont(199B)
----checkup(509B)
----sendToCosm(244B)