How to print response to AT commands in Arduino serial port?
<p>I want to print the response to AT command. I'm sending AT command but I'm not getting any response in the Arduino serial port. It's giving -1 instead of OK.</p>

<pre><code>#include "SoftwareSerial.h"
String ssid = "connectify-krish";
String password = "12345678";

String myword= "";
SoftwareSerial esp(10, 11);
void setup() {
  Serial.begin(9600);
  esp.begin(9600);
  esp.write("AT");
  Serial.println(esp.read());
}

void loop() {}
</code></pre>