zoukankan      html  css  js  c++  java
  • ESP8266莫名重启或者死机问题

    多半是内存使用不当

       1. 如果你要用很大长度的数组,那么可以换用更小的数据类型。比如,int值要占用两个字节,你可以用byte(只占用一个字节)代替;
        2. esp8266有时会莫明重启,大部分情况是变量设置不当,虽然编译通过了,但变量在调用过程中出现异常,造成函数运行时变量内存溢出,写复杂代码时,
           最好是不要一次写了很多再编译调试。
        3. 尽量少用全局变量,全局变量在整个生命周期都会存在,非常耗内存,内存不足也是esp8266不稳定因素之一。长串的变量尽量作长度控制,设定边界,如果你的项目很大,一定要规划好变量。
        4. 尽量不要在loop循环中定义变量,尽量只放函数封装,貌似这里定义了变量不会像函数中的局变量用完就回收。

      5.The ESP8266 requires a good power supply as it produces current spikes of up to 170 mA during transmit (typical average consumption is around 70 mA when WiFi is on). Check the power supply first, if your ESP runs unstable, has a bad throughput, or reboots from time to time. A large capacitor between Vdd and Gnd can help if you experience problems here. It has been reported that there are sometimes severe throughput problems with the small power supply/serial-to-usb boards for the ESP01. These boards use an XC6206 voltage regulator labeled "662K". Maybe you try an alternative power supply first, if you experience these kind of problems.

  • 相关阅读:
    【NOIP2017】跳房子
    MySQL的多表查询(笛卡尔积原理)
    MySQL的delete误操作的快速恢复方法
    MYSQL高可用集群架构-MHA架构
    mysql数据库的创建问题
    Python中xlrd和xlwt模块使用方法----》》数据库数据导出(之一)
    mysql数据库的批量数据导入与导出,性能提升。
    使用Python对ElasticSearch获取数据及操作
    SQL语句
    ElasticSearch-排序
  • 原文地址:https://www.cnblogs.com/mingyunrangwozoudaoxianzai/p/10239385.html
Copyright © 2011-2022 走看看