Noduino DHT11
来自Jack's Lab
(版本间的差异)
(以“== 开发环境准备 == 根据您的系统,选择如下快速指南: * Getting Started with Noduino SDK on Linux * [[Getting Started with Noduino SDK on ...”为内容创建页面) |
|||
第1行: | 第1行: | ||
+ | == 概述 == | ||
+ | |||
+ | 性价比超高的温湿度传感器,适合要求不高的应用。 | ||
+ | <br><br> | ||
+ | |||
== 开发环境准备 == | == 开发环境准备 == | ||
第11行: | 第16行: | ||
== 硬件准备 == | == 硬件准备 == | ||
+ | |||
+ | 传感器三根线,VCC 接3.3V,GND 接地,中间数据线接开发板 D1 口 | ||
+ | |||
2016年8月28日 (日) 09:29的版本
目录 |
1 概述
性价比超高的温湿度传感器,适合要求不高的应用。
2 开发环境准备
根据您的系统,选择如下快速指南:
- Getting Started with Noduino SDK on Linux
- Getting Started with Noduino SDK on Mac OS X
- Getting Started with Noduino SDK on Windows
3 硬件准备
传感器三根线,VCC 接3.3V,GND 接地,中间数据线接开发板 D1 口
4 编译烧写
进入你的 dht11 目录:
$ cd /PATH/TO/noduino-sdk/examples/noduino/dht11
编译、上传一步完成:
$ make flash
不同平台下,你的串口设备号可能不一样,确认一下你的串口设备,Linux 下 Falcon 开发板可能被识别为 /dev/ttyUSB1(dmesg 查看),则:
$ make flash ESPPORT=/dev/ttyUSB1
Windows 下 Falcon 开发板可能被识别为 COM6(控制面板 --> 设备管理器里查看),则:
$ make flash ESPPORT=COM6
5 查看结果
上传完之后,用串口工具,用 115200 的波特率打开串口,即可看到串口在持续输出传感器测得的值:
Windows 下可用串口调试助手这类插看
Linux 下推荐使用 picocom:
$ sudo apt-get install picocom $ picocom -b 115200 /dev/ttyUSB1 picocom v1.7 port is : /dev/ttyUSB2 flowcontrol : none baudrate is : 115200 parity is : none databits are : 8 escape is : C-a local echo is : no noinit is : no noreset is : no nolock is : no send_cmd is : sz -vv receive_cmd is : rz -vv imap is : omap is : emap is : crcrlf,delbs, Terminal ready ...... ......
Ctrl + a q 退出 picocom
6 代码示例
7 扩展阅读
- 更多问题参考: