3
| Instead of using the CP2102 USB-to-Serial adapter to program the ESP8266 module, you can instead use the Arduino Uno.
First, you need to program your Arduino Uno with the BareMinimum example.
- Select the BareMinimum Sketch from the Arduino v1.6.7 IDE menu
File | Examples | Basics | BareMinimum
- Select the Arduino board from the Arduino IDE menu
Tools | Board | Arduino/Genuino Uno
- Select the correct port number from the Arduino IDE menu
Tools | Port | [port #].
- Connect your Arduino to your computer and click Upload.
4
| Connections for the ESP8266-12 to the Arduino Uno
You need to use the mini-hook jumper wires or solder the wires to make the connections.
ESP8266-12 | Arduino Uno
|
---|
CHPD | 3.3V for chip enable (solder a wire between CHPD and VCC to make it permanent)
| D15 | GND (solder a wire between D15 and GND to make it permanent, (or via a 10K resistor if you want to use D15 for I/O)
| VCC | 3.3V (Do not connect to 5V or you will destroy the chip)
| GND | GND
| TX | TX pin 1 (no crossover)
| RX | RX pin 0 (no crossover)
| CHPD | 3.3V (solder a wire between CHPD and VCC to make it permanent)
| D0 | GND for programming; no connection for running, (or connect to DTR for automatic programming)
| RESET | GND to reset chip; no connection for normal operation, (or connect to RTS for automatic programming)
| D2 | no connection for programming
|
|
|
5
| Connections for the ESP8266-01 to the Arduino Uno
You need to use either the Dupoint male-to-female jumper wires or the mini-hook jumper wires to make the connections.
ESP8266-01 | Arduino Uno
|
---|
CHPD | 3.3V for chip enable (solder a wire between CHPD and VCC to make it permanent)
| VCC | 3.3V (Do not connect to 5V or you will destroy the chip)
| GND | GND
| TX | TX pin 1 (no crossover)
| RX | RX pin 0 (no crossover)
| D0 | GND for programming; no connection for running, (or connect to DTR for automatic programming)
| RESET | GND to reset chip; no connection for normal operation, (or connect to RTS for automatic programming)
| D2 | no connection for programming
|
|
|
|
|
6
| Uploading the program to the ESP8266.
- Select the ESP8266 board from the Arduino v1.6.7 IDE menu
Tools | Board | Generic ESP8266 Module
- Select the correct COM port that your adapter is connected to.
- Reset the ESP8266 module by disconnecting and connecting the wire to VCC, or you can briefly connect RESET to GND.
You should see the blue LED on the board flash once.
- Click the Upload button as you normally would.
The blue LED on the WiFi module will flash as the program is being uploaded onto the module.
- If you get the orange warning message "espcomm_sync failed" then check your wiring (probably the RX and TX connections are swapped) and then reset the module to upload it again.
- You can speed up the upload by selecting a faster speed. Select Tools | Upload Speed | 256000. Beware that the upload might failed if you select a speed faster than 256000.
- To run the program, you need to first disconnect D0 from GND, and then reset the chip by briefly connecting RESET to GND.
If you have connected D0 to DTR, and RESET to RTS, then the chip will automatically reset and run the program after loading.
- Hint: you might want to connect a push button between RESET and GND so that you can easily reset the chip to run the program.
|
| |