//softwareserial_to_esp01.ino
//this is to be uploaded to the arduino, not the ESP-01.
//The ESP-01 is attached through pins 10(rx) and 11(tx) to
//  txd and rxd respectively.
#include <SoftwareSerial.h>
SoftwareSerial mySerial(10,11); // RX, TX
void setup() {
  // Open serial communications and wait for port to open:
  Serial.begin(9600);
  while (!Serial) {}
  // set the data rate for the SoftwareSerial port
  mySerial.begin(9600);
  Serial.println("");
  Serial.println("You can type AT commands in the textbox above.");
  Serial.println("");
  Serial.println("Here is your firmware version:");
  mySerial.println("AT+GMR");
}
void loop() { // run over and over
  if (mySerial.available()) {
    Serial.write(mySerial.read());
  }
  if (Serial.available()) {
    mySerial.write(Serial.read());
  }
}
