来源:so.csdn.net
发布时间:Nov 26, 2020, 3:08:59 AM
原地址:https://blog.csdn.net/bibo1984/article/details/110195683

1 材料清单
| 序号 | 名称 | 数量 | 淘宝链接 |
|---|---|---|---|
| 1 | 树莓派 4B 4g 开发板 | 1 | https://item.taobao.com/item.htm?spm=a1z09.2.0.0.70b12e8dv8xy86&id=601946840416&_u=s2km3ff4044 |
| 2 | ESP8266串口wifi模块 NodeMcu | 1 | https://item.taobao.com/item.htm?spm=a1z09.2.0.0.6eb72e8dMsnTbT&id=533284376826&_u=q2km3ff9545 |
| 3 | nodemcu底板 | 1 | https://item.taobao.com/item.htm?spm=a1z09.2.0.0.6eb72e8dMsnTbT&id=548720934902&_u=q2km3ff1d57 |
| 4 | LED交通信号灯模块 | 1 | https://item.taobao.com/item.htm?spm=a1z09.2.0.0.6eb72e8dMsnTbT&id=574859809824&_u=q2km3ff5427 |
2连线说明
| 序号 | Nodemcu | LED交通信号灯模块 |
|---|---|---|
| 1 | D5 | R |
| 2 | D6 | Y |
| 3 | D7 | G |
| 4 | GND | GND |
3代码相关
树莓派 dragoncar web 代码,路径:https://github.com/bibo19842003/dragoncar
nodemcu 代码,路径:https://github.com/bibo19842003/smarthome/blob/master/nodemcu/arduino-ide/hometest1/hometest1.ino
4使用
a、树莓派启动 dragoncar web 服务
b、nodemcu 通电并加载代码
c、配置 nodemcu IP
d、web 服务手动关联 nodemcu IP
e、手机访问网页,语音控制灯的亮灭