当连接DHT和ESP8266时出现奇怪的错误 - 数据不断变化类型

时间:2016-07-13 16:08:37

标签: arduino esp8266

当试图使用DHT11模块,ESP8266芯片和标准FTDI芯片将温度和湿度数据发送到数据库时,我在将程序上传到模块时偶然发现了这个奇怪的错误:

esptool v0.4.8 - (c) 2014 Ch. Klippel <ck@atelier-klippel.de>
    setting board to ck
    setting baudrate from 115200 to 115200
    setting port from COM1 to COM20
    setting address from 0x00000000 to 0x00000000
    espcomm_upload_file
    espcomm_upload_mem
    setting serial port timeouts to 1000 ms
opening bootloader
resetting board
trying to connect
    flush start
    setting serial port timeouts to 1 ms
    setting serial port timeouts to 1000 ms
    flush complete
    espcomm_send_command: sending command header
    espcomm_send_command: sending command payload
    serialport_receive_C0: 9C instead of C0
trying to connect
    flush start
    setting serial port timeouts to 1 ms
    setting serial port timeouts to 1000 ms
    flush complete
    espcomm_send_command: sending command header
    espcomm_send_command: sending command payload
    espcomm_send_command: receiving 27847 bytes of data
    serialport_receive_C0: 62 instead of C0
trying to connect
    flush start
    setting serial port timeouts to 1 ms
    setting serial port timeouts to 1000 ms
    flush complete
    espcomm_send_command: sending command header
    espcomm_send_command: sending command payload
    serialport_receive_C0: 03 instead of C0
resetting board
trying to connect
    flush start
    setting serial port timeouts to 1 ms
    setting serial port timeouts to 1000 ms
    flush complete
    espcomm_send_command: sending command header
    espcomm_send_command: sending command payload
    serialport_receive_C0: C7 instead of C0
trying to connect
    flush start
    setting serial port timeouts to 1 ms
    setting serial port timeouts to 1000 ms
    flush complete
    espcomm_send_command: sending command header
    espcomm_send_command: sending command payload
    serialport_receive_C0: 1B instead of C0
trying to connect
    flush start
    setting serial port timeouts to 1 ms
    setting serial port timeouts to 1000 ms
    flush complete
    espcomm_send_command: sending command header
    espcomm_send_command: sending command payload
    serialport_receive_C0: 03 instead of C0
resetting board
trying to connect
    flush start
    setting serial port timeouts to 1 ms
    setting serial port timeouts to 1000 ms
    flush complete
    espcomm_send_command: sending command header
    espcomm_send_command: sending command payload
    serialport_receive_C0: 1C instead of C0
trying to connect
    flush start
    setting serial port timeouts to 1 ms
    setting serial port timeouts to 1000 ms
    flush complete
    espcomm_send_command: sending command header
    espcomm_send_command: sending command payload
    espcomm_send_command: receiving 539 bytes of data
    serialport_receive_C0: 62 instead of C0
trying to connect
    flush start
    setting serial port timeouts to 1 ms
    setting serial port timeouts to 1000 ms
    flush complete
    espcomm_send_command: sending command header
    espcomm_send_command: sending command payload
    serialport_receive_C0: C7 instead of C0

代码验证正常,但是,我认为这是一个硬件问题。

1 个答案:

答案 0 :(得分:0)

尝试较低的波特率,可能更稳定。 您可能还想尝试基于CP2102的串行接口,似乎很多人都遇到了FTDI问题。