树莓派Pico W项目与脉冲宽度调制(PWM)全解析
一、树莓派Pico W项目介绍
在树莓派Pico W的应用中,有多个有趣且实用的项目,下面为大家详细介绍。
1. 项目18:带时间戳保存温度
这个项目结合了模拟温度传感器芯片TMP36和RTC模块DS1302。每2秒读取一次环境温度,共读取10次,并将带有时间戳的温度数据存储在树莓派Pico W上。10秒后,将保存的数据显示在Thonny屏幕上。
- 项目目标 :展示如何在Pico上带时间戳保存传感器数据。
- 电路连接 :TMP36温度传感器芯片连接到Pico的一个模拟输入引脚,RTC模块的连接方式与之前的项目相同。
- 代码实现 :
#----------------------------------------------------------
#
SAVE TEMPERATURE WITH TIME STAMP
#
================================
#
# This program uses the DS1307 RTC module to read the current
# date and time. The ambient temperature is read and stored on
# the Pico with time stamp. The stored data is then displayed
# on the termin
超级会员免费看
订阅专栏 解锁全文
27

被折叠的 条评论
为什么被折叠?



