You can use one of the following things to connect ESP8266 with a breadboard:
- Using female/male extension jumper wires (https://www.adafruit.com/product/1954)
- Using a 10-pin IDC breakout helper (https://www.adafruit.com/product/2102)
You can use one of the following things to connect ESP8266 with a breadboard:
The ESP8266 works only with regulated 3.3V. You can build a simple regulated power supply with an LD1117-3.3 linear voltage regulator. It can provide 3.3V at 800 mA. You can purchase a TO-220 package of the LD1117-3.3 for use with a breadboard. Figure 1.5 shows the circuit diagram for 3.3V output. You can supply 4-15V DC to Vin using one of the following sources:
Now, you can connect the power supply to ESP-01:
ESP8266 ESP-01 doesn't have a built-in USB to serial conversion chip to directly connect to your computer through a USB cable for flashing programs. As a solution, you can use a USB to TTL serial console cable to connect ESP8266 to a computer. Figure 1.6 shows a USB TTL serial console cable from Adafruit (https://www.adafruit.com/product/954):
The type A USB plug includes a USB to serial conversion chip and provides four wires to connect to your ESP8266ESP-01 board. Table 1.1 shows the functions of the four wires:
Color |
Function |
Red |
Power |
Black |
Ground |
White |
RX |
Green |
TX |
You can use the following steps to connect the USB to TTL serial cable with your ESP8266:
The following steps will guide you how to use a serial terminal program to communicate and execute AT commands with ESP-01. In this example, you will use PuTTY, SSH, and a Telnet client for Windows to run AT commands through a serial port:
Table 1.2 shows the complete set of AT commands that you can use with ESP8266:
AT command |
Manual |
AT |
Attention. |
AT+RST |
Resetting the unit. |
AT+GMR |
Retrieving the firmware version ID. |
AT+CWMODE=? AT+CWMODE? AT+CWMODE=<mode> |
Setting operation mode:
The access point functionality does not have a DHCP function and has only minimum functionalities. However, it will assign an IP address to the client and there is no way to do a manual IP, manual DNS, and other advanced IP functionalities. This unit only provides minimal functionalities. |
AT+CWJAP=<ssid>,<pwd> AT+CWJAP? |
Joining a network or just an access point. |
AT+CWLAP |
Retrieving the list of the visible network. |
AT+CWQAP |
Disconnecting from the current network connection. |
AT+CWSAP=<ssid>,<pwd>,<chi>,<ecn> AT+CWSAP? |
Setting up access point SSID, password, RF channel, and security scheme. The following is the security scheme:
|
AT+CWLF |
Retrieving a list of assigned IP addresses. |
AT+CIPSTATUS |
Retrieving the current connection as socket client or socket server. |
AT+CIPSTART=? AT+CIPSTART=<type>,<addr>,<port> (AT+CIPMUX=0) AT+CIPSTART=<id>,<type>,<port> (AT+CIPMUX=1) |
Connecting to socket server (TCP or UDP). |
AT+CIPSEND=<length> (AT+CIPMUX=0 & AT+CIPMODE=0) AT+CIPSEND=<id>,<length> (AT+CIPMUX=1 & AT+CIPMODE=0) AT+CIPSEND (AT+CIPMUX=0 & AT+CIPMODE=1) |
Sending by connection channel and by specific length. |
AT+CIPCLOSE |
Closing the socket connection. |
AT+CIFSR |
Retrieving the assigned IP address when the unit is connecting to a network. |
AT+ CIPMUX=AT+CIPMUX? |
Setting a single connection (AT+CIPMUX=0) or multi-channel connection (AT+CIPMUX=1). |
AT+CIPSERVER= [,] (AT+CIPMUX=1) |
Starting at the specified port or stopping the server. The default port is 333. <mod> is as follows:
|
AT+CIPMODE=<mode> AT+CIPMODE? |
Setting transparent mode (data from the socket client will be sent to the serial port as is) or connection channel specific mode (+IPD,<connection channel>,<length>) segments. Data sent from the socket client will be broken into multiple unsolicited (+IPD,<connection channel>,<length>) segments. <mode>is as follows:
|
AT+CIPSTO=<time> AT+CIPSTO? |
Setting the automatic socket client disconnection timeout from 1 to 28800 seconds due to inactivities. |
Packetized data from the unit |
Unsolicited data packet (+IPD, <connection channel>,<length>). |
Every AT command starts with the letters AT. Here's an example:
AT+GMR <CR>
Type the AT command AT+GMR and press the Enter key. Don't type <CR>. The CR indicates carriage return.
This will return the firmware version ID of the ESP8266 module, as shown in Figure 1.8:
Likewise, you can run any AT command with the PuTTY terminal to execute on ESP8266 through the serial connection.