- Serial Port Cable
- Arduino Hardware Serial Port Monitor
- Arduino Software Serial Example
- Arduino Uno Hardware Serial Port
Following on from the FTDI + ESP8266 post, if you do not have a FTDI serial adaptor you can use an Arduino. Here is how to set up the Arduino to talk to the ESP8266.
![Arduino hardware serial port Arduino hardware serial port](/uploads/1/2/6/4/126483163/223937387.jpg)
I an using a 5V Arduino Nano which of course is 5V. The Esp8266 is a 3.3v device and so I am using a voltage divider to bring the Arduinos 5V down to 3.3v. If you are using a 3.3v Arduino then you do not need the voltage divider.
The wiring is very similar to the FTDI.
Arduino pin 3 to voltage divider and then to ESP8266 RX
Arduino pin 2 to ESP8266 TX
Arduino GND to ESP8266 GND
Pull CH_PD HIGH with a 10K resistor to +3.3v
+3.3V to vcc
Arduino pin 3 to voltage divider and then to ESP8266 RX
Arduino pin 2 to ESP8266 TX
Arduino GND to ESP8266 GND
Pull CH_PD HIGH with a 10K resistor to +3.3v
+3.3V to vcc
(for uno/mega) The TX and RX lines of the hardware serial are connected to pins 0 and 1 (for most Arduino boards, at least). These are connected (through a resistor) to the TX and RX lines of an on-board USB-serial adapter. The USB D+ and D- lines from that are connected to the USB port.
- Jun 18, 2016 The hardware serial is called Serial1 ('Serial' is a virtual USB serial port, it can only be used to act like USB-serial adapter to a USB host) The only things that can be plugged into the USB port and be expected to work are a USB host device like a computer (which will see a serial port), or +5v power (ex, from USB phone charger or something).
- I couldn't find examples in my Arduino books and with Google that used the hardware serial port of the Uno R3 to connect peripherals. Edit 1: Let me add the following: I don't want to use the Serial monitor (of the Arduino IDE) and the peripheral (Bluetooth module) at the same time. I don't expect that it can be used at the same time.
Serial Port Cable
You only need the voltage divider on the Arduino TX pin. The 5V Arduino will read 3.3v as HIGH so you can connect the ESP8266 TX pin directly to the Arduino RX pin.
Make sure the ESP8266 has enough current. If it does not it may keep resetting and may not broadcast a signal.
![Arduino Arduino](/uploads/1/2/6/4/126483163/442387778.png)
Arduinos cannot supply enough current and you should use a separate power supply. While experimenting I use a bread board power supply.
Arduino Hardware Serial Port Monitor
I am using a simple serial in, serial out sketch.
Arduino Software Serial Example
Once everything is setup, open the serial monitor and cycle the power on the ESP8266 and you should receive the welcome message.
Arduino Uno Hardware Serial Port
You can now interrogate the ESP8266 and change the settings. For more on talking to the ESP8266 see FTDI + ESP8266