New to arduino, working with ESP8266 WiFi Module

Hello all,

I am relatively new to arduino but I've messed around with it years ago when I was in high school but not necessarily in depth.

Currently I'm working on a project where I need to send GPS data between two ESP8266's. I have tried researching how to program the esp's through their GPIO ports but a lot require a direct connection to a usb port. I have an arduino due that I've been using to send serial commands to the ESP device using this well used way:

void setup() {

void loop() {
   // put your main code here, to run repeatedly:

  if(Serial1.available()) {
    byte b =;

  if(Serial.available()) {
    byte a =;

I was wondering if anyone could shed some light on what libraries I should use and how I should go about connecting the two ESP's. (I found the ESP8266 git hub but I don't know which parts of that I should add to my IDE in order to accomplish my project)

I am very new to arduino and any articles or material you think I should look at would be very appreciated.


Do you have the ESP-01 module?

The ESP-01 ideally should have its own 3.3V power supply though some people report no problems using the Arduino's 3.3V pin.
The ESP-01 operates on 3.3V so logic level shifting is required especially for its RX pin to prevent damage.

Are you envisioning peer-to-peer without a router?

The ESP-01 comes by default with AT firmware. Do plan on using it? Or do you plan on reflashing it with Arduino Core for ESP8266 firmware?

Personally I think using nRF24L01 modules is a better idea.

I am using the WRL-13678 ROHS version of the ESP8266 from sparkfun. This is for a college project and we're using their budget so we are kind of stuck with what we got. If you think I should talk to my professor to allow more funding so we can purchase that module, let me know.

I have connected the chip-EN and the 3.3v pin on the ESP to the arduino 3.3v output.

Also, yes that is what I am envisioning. Essentially, my team and I are creating what my professor called an "Intelligent Convoy System". Where there is a lead vehicle controlled by a user and the lead vehicle transmits gps data over its wifi link to the vehicle behind it. That vehicle will use that data and compare it to its own gps data to get information on how to move in order to follow the path of the leading vehicle.

By "AT-Firmware" do you mean the Serial commands that I can type into the Serial monitor using the code below?

I thought there were various libraries that could be used to utilize some of the capabilities of the ESP8266. One of the reasons for us picking that wifi device was because we researched that it was easily interfaced with the due. Should I just use the commands from the link above to set up a communication network and send packets of GPS data some how?

Thanks again any info you may be willing to give is greatly appreciated :slight_smile:

That looks to be the ESP-01 version of the board using the ESP8266.

There is a library which lets you program the ESP-01 keeping intact its AT command firmware.
Not sure the name.

Arduino to ESP8266 By Serial Communication | Martyn Currey shows the connection required.

Most people have their Arduino's communicating to a router.
You'll have to search about what you need to do set up ad-hoc network.