3

There is this library - https://github.com/esp8266/Arduino That provides a more user-friendly API for WiFi capabilities with the ESP8266.

However, all tutorials that I found so far for this library show how to program the ESP8266 (usually 12) directly. That is not what I'm looking for.

My current setup is having an Arduino Uno/Nano where the ESP8266 is connected to, say, GPIO8 and GPIO9 (RX, TX) and I use SoftwareSerial to communicate with it with AT commands. So I want to keep all the logic in my Arduino, but use ESP-01 only to provide WiFi capabilities to my Arduino.

However in that library I don't see the option to set the serial port pins (RX and TX) so I'm not sure if that's even possible.

In short - I want to use this library, but not program the ESP directly. Also, I'm using an ESP-01 and not 12.

Thanks.

2
  • 1
    i strongly encourage you to investigate directly programming the ESP and forgetting the AVR;
    – dandavis
    Commented Sep 17, 2017 at 19:59
  • 1
    If you use serial to talk to the ESP then you are adding a load to the Arduino and ESP you don't need to add. You are going to constrain the data link to ~9600, because this sort of hook up doesn't seem to work above that with software serial. Finally you a going to use a ESP, with a clock speed of at least 80MHz, as a slave to an Arduino with a max clock speed of 32MHz. You can program the ESP with the Arduino IDE, using the same language. Look at using the Arduino as a port expander to the ESP communication over I2C. Commented Sep 18, 2017 at 7:30

2 Answers 2

6

You cannot use that "library". Simply because that isn't a library, that is a core. It's the entirety of the Arduino API designed to run on an ESP8266.

You can use it to program the ESP8266 directly and nothing else. No part of that has anything at all to do with Arduino boards like the Uno.

1
  • +1 for the above answer as well since it clarifies the point that the stuff you have mentioned is not a library and is a core;
    – techniche
    Commented Sep 18, 2017 at 7:35
4

You can infact connect ESP as a serial device to the arduino and use AT commands supported by the ESP to interact with it and achieve what you want;

For ESP-01 read the detail on http://www.teomaragakis.com/hardware/electronics/how-to-connect-an-esp8266-to-an-arduino-uno/

Please read the following instructable which has detailed explanation on how to connect ESP12 also if interested; http://www.instructables.com/id/ESP-12E-ESP8266-With-Arduino-Uno-Getting-Connected/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.