NODEMCU introduction and use

NodeMcu esp8266-12E is based on open source IoT packaged boards.
Simple to use module debugging is very convenient and simple in the process of learning esp module.

enter description here

NodeMcu

ESP-12E is to use a few more modules on the package
(only NodeMCU V1 is using the ESP-12
as long as NodeMCU V2 or V3 ESP-12E is to use)
enter description here

enter description here
The main parameters of
enter description here
the pin diagram (Pin developers board without the GPIO GPIO not need to see the corresponding table)
enter description here
enter description here

ESP8266 chip 17 GPIO pins (GPIO0 ~ GPIO16). These pins are GPIO6 ~ GPIO 11 is connected to the flash development board (Flash Memory) is therefore not recommended GPIO6 ~ GPIO 11.

In this remaining 11 stitches in, there are two pins reserved for serial RX and TX.

Some GPIO pin while both the other functions, such as the RX, TX, SD2, SD3, as most of these GPIO pins are not used because they can be used in other processes.
Thus, only the last nine general-purpose I / O pins, i.e., D0 to D8.

Note that, D0 | GPIO16 as GPIO pins can only read / write and does not support any special features
enter description here
of voltage and current limit
NodeMCU development of input and output voltage limiting plate pin is 3.3 V. If more than 3.6V voltage is applied to the pin it may cause damage to the chip circuitry. Also note that these pins maximum output current is 12mA.

Since the pin NodeMCU Development Board allows the voltage and current are lower than the pin Arduino development board,

特殊引脚
GPIO2引脚 在NodeMCU开发板启动时是不能连接低电平的。
GPIO15引脚在开发板运行中一直保持低电平状态。
GPIO0引脚在开发板运行中需要一直保持高电平状态。否则ESP8266将进入程序上传工作模式也就无法正常工作了

模拟输入
AD转换 将模拟量转换为数字量 只有一个引脚 A0,nodemcu上可以读取模拟输入0-3.3v的电压

通讯
 串行端口(UART)TX(GPIO1)和RX(GPIO3)
以及 TX(GPIO2)和RX(GPIO8)

I2C
  ESP8266只有软件模拟的I²C端口,没有硬件I²C端口。可以使用任意的两个GPIO引脚通过软件模拟来实现I²C通讯。ESP8266的数据表(datasheet)中,GPIO4(D2)标注为SDA,GPIO5(D1)标注为SCL。

SPI
ESP8266的SPI端口情况如下:
GPIO14 — CLK
GPIO12 — MISO
GPIO13 — MOSI
GPIO 15 — CS(SS)

安装驱动

需要安装驱动 才能通过usb连接NodeMcu 电脑才能识别到端口
Windows ch341驱动下载
(v1使用ch341驱动 V2 与V3 大部分使用cp210x驱动)
cp210x驱动下载

arduino开发

环境搭建

  1. 在项目 加载库 库管理中 搜索dht 下载DHT sensor by Adafruit (1.30)
    enter description here
    2.打开工具 开发板 开发板管理器 搜索esp8266 下载esp8266 by ESP8266 Community (2.4.2)
    enter description here
    3.选择NodeMcu开发板
    enter description here
    4.使用示例
    enter description here
    上传会看到灯一亮一灭
    联合mqtt使用
    打开示例 pubsubclient中的mqtt_esp8266
    enter description here
    (如果没有这个库 可以到 项目–> 加载库 —> 管理库里面 进行下载)

else

基于NodeMcu的开发可以到这里 进行学习 http://niehen.cn/category/esp8266/
参考 https://blog.everlearn.tw/nodemcu/%E7%AC%AC%E4%B8%80%E6%AC%A1%E8%B3%BC%E8%B2%B7-nodemcu-%E5%B0%B1%E4%B8%8A%E6%89%8B
参考
esp8266ex技术规格书
太极创客

更多学习教程

ESP开发学习基础知识

基础知识包括对esp模块的认识与了解 mqtt协议的了解,arduino IDE运用代码编写等等。

  1. arduino基础学习
  2. esp系列模块的介绍
  3. mqtt协议的介绍与使用
  4. 利用mqtt esp模块 基于arduino IDE开发方法
  5. esp模块的AT指令 刷固件
  6. esp模块睡眠模式使用
  7. esp8266-01s介绍与使用
  8. esp8266-12f介绍与使用
  9. NodeMcu介绍与使用
esp开发IOT应用

基于esp8266的模块以及其他模块根据实际的应用场景与需求制作的物联网应用

  1. 基于FRID arduino 继电器 电磁锁开发的FRID门禁系统
  2. esp32-cam video stream acquired image processing
  3. Stepping motor esp8266 mqtt developed automatic curtain control
  4. Gets indoor temperature and humidity based on DHT11 Esp8266 mqtt
  5. Gets indoor air quality based on CCS811 esp8266 mqtt
  6. Based on infrared remote control intelligent module esp8266 mqtt development
  7. Based ws2812 esp8266 mqtt development of intelligent multi-level lighting
  8. Based ws2812 esp8266 mqtt development of intelligent multi-mode light atmosphere
  9. Broadcast System Intelligent Voice mp3player esp8266 mqtt based development
  10. The wisdom of the comprehensive application of IOT classroom project development
Published 46 original articles · won praise 59 · views 70000 +

Guess you like

Origin blog.csdn.net/Nirvana_6174/article/details/104486038