I
I
Ilya Pavlov2015-04-25 20:00:23
Arduino
Ilya Pavlov, 2015-04-25 20:00:23

How to set up Arduino to work with ESP8266 Wi-Fi module?

In short: connected the GND and VCC+CH_PD of the module to the GND and 3.3v of the Arduino. TX and RX to 10 and 11.
Here is the code :

#include <SoftwareSerial.h>
SoftwareSerial espSerial(10, 11);
 
const int COM_BAUD = 9600;
 
void setup() {
  espSerial.begin(COM_BAUD);
  Serial.begin(COM_BAUD);
  Serial.println("Setup done");
}
 
void loop() {
  if ( espSerial.available() )
    Serial.write( espSerial.read() );
  if ( Serial.available() )
    espSerial.write( Serial.read());
}

Through the serial port monitor (Arduin IDE), you can give AT commands: AT + RST - reboot, AT + CWLAP - show networks, etc. And how to execute these commands from the Arduino sketch? And yet, the module gets very hot, sometimes it even hurts to hold, what is the reason for this? Which instruction I used: connection: digitrode.ru/computing-devices/mcu_cpu/186-pogodna... theory: tim4dev.com/arduino-esp8266-true-start

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
Vladimir, 2015-04-26
@PiCoderman

And what kind of Arduino? For 5 or 3.3 volts?
For the module also wants 3.3v level signals for tx rx.
It can work for 5, but that's how much ..

V
Vladimir Martyanov, 2015-04-25
@vilgeforce

It looks like you need to send AT commands to the module via the serial port. And the fact that it heats up is bad ...

R
Roman Belyaev, 2015-05-04
@exclus

So write in the sketch:
espSerial.write(AT+RST);
And the softserial on 10.11 does not support high exchange rates, please note.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question