esp8266 AT brush firmware instructions and

AT command is an instruction to the communication connection between the terminal device is applied to the PC application. AT namely Attention. Each AT command line can contain only one AT command; ESP8266 also has a number of AT commands, can be tested

esp8266 module AT test

I usually bought for the new module to be tested to see if AT problem
or a long time without the use of wifi module ready to be tested to ensure that the module is no problem
if the module in question is carried out brush firmware

Wiring
enter description here
using the serial port tool (I used here is sscom) and set it to select baud rate and other serial port ( download link )

enter description here

esp modules have three modes are sta, AP and sta / AP

  • The sta mode module connected to the router corresponding to the client
  • AP mode corresponds to the router module able to transmit WiFi, (factory default module to AP mode)
  • sta / AP is above two modes are
AT command

( Reference Book instruction )

enter description here

enter description here

  1. Send AT + CWMODE = 1 command module configured sta mode (mode parameters corresponding 1,2,3 sta, AP and sta / AP).
  2. Transmitting the current scan command AT + CWLAP nearby WiFi, the module will return a list of available AP.
  3. Use AT + CWJAP = "WiFi Name", "WiFi password" to connect to the router specified,
    for example, I was "lib-free-wlan01" WiFi in the library, the password is "zhku-lib", the actual connection instructions sent WiFi It is AT + CWJAP = "lib-free -wlan01", "zhku-lib".
    Return "WIFI CONNECTED" explained the connection is successful, "WIFI GOT IP" represents the module assigned to the IP.
  4. Finally, using WiFi AT + CWQAP disconnect the current connection.
    enter description here

ESP8266模块 5G频段的WiFi扫描不到 所以电脑发散的热点需要改成2.5G频率的。

使用arduino进行

其实也就是将arduino当做一个串口接收工具使用
接线图
enter description here
传入代码

#include <softwareserial.h>
SoftwareSerial ESP8266(10, 11); // RX | TX
void setup() {
Serial.begin(9600);
ESP8266.begin(9600);
}
void loop()
{
    // Keep reading from ESP-01s and send to Arduino Serial Monitor
    if (ESP8266.available())
   {
     Serial.write(ESP8266.read());
    }
     // Keep reading from Arduino Serial Monitor and send to ESP-01s
    if (Serial.available())
    {
      ESP8266.write(Serial.read());
     }
}

刷固件

刷固件也是一种 编写esp的方式
同样也是一种让esp恢复出厂设置的方式,如果esp在设置等方面出现问题,这是应该刷官方出厂的固件。

  1. 资料下载

AT固件库是从该芯片的官网上下载的AT固件,资源下载链接 http://seafile.niehen.cn/d/9f7e0fa76198410396ba/

打开AT固件库的文件可以看到有8M和32M两种,我们直接选用8M的即可。
烧写软件,用的是flash_download_tools_v3.6.5(在刚才的链接里也有)
打开该软件后出现这样的页面,直接选择第一项即可。
enter description here

  1. 连接esp。
    可以使用usb转ttl。不过推荐使用esp烧写工具,方便简单,
    此时IO0 要拉低 下载位。其他引脚不变
    enter description here
  2. 烧写设置
    在最上面一栏 选择上面提到的 8M固件
    下面速度 40MHZ 模式 DIO
    flash size 8Mbit 后面选择DoNotChgBin
    enter description here
    最后选择端口 就可以点击START开始了。
    烧写过程需要几分钟的时间
    enter description here

烧写完成会显示FINISH
enter description here
4. 测试
可以打开sscom软件,选择对应的端口。
输入AT,返回OK。即可说明固件刷写成功。
接下来就可以使用其他的AT指令来进行对esp的配置或其他操作。
AT+CWMODE=3 指令配置模块为sta/AP模式(参数1,2,3分别对应模式sta,AP和sta/AP)。
AT+RST 重新启动
enter description here
AT+UART_DEF=9600,8,1,0,0 (arduino的软串口连接ESP-01wifi模块不适合波特率为115200(出厂时默认设定的!)在AT模式下输入AT+UART_DEF=9600,8,1,0,0修改为9600。)
参考链接
参考链接

参考代码链接

GitHub地址

更多学习教程

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获取视频流图像处理
  3. 基于步进电机 esp8266 mqtt开发的自动窗帘控制
  4. 基于DHT11 Esp8266 mqtt获取室内温湿度
  5. 基于CCS811 esp8266 mqtt 获取室内空气质量
  6. 基于红外模块 esp8266 mqtt开发的智能遥控控制
  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/104402870