I am trying to learn internet of things with smart home. I will connect an ESP8266 and an Arduino with the IBM Bluemix server to control a circuit from a public IP.
I want to start with the local network for now. I have gone through a couple of links which seem like a great start http://allaboutee.com/2014/12/30/esp8266-and-arduino-webserver/
They explain how it works, and have source code but no circuit diagram. How should I connect the ESP8266 with Arduino for this example ?
#include <SoftwareSerial.h>
const byte rxPin = 2; // Wire this to Tx Pin of ESP8266
const byte txPin = 3; // Wire this to Rx Pin of ESP8266
// We'll use a software serial interface to connect to ESP8266
SoftwareSerial esp8266(rxPin,txPin);
void setup() {
Serial.begin(9600);
esp8266.begin(9600);
delay(1000);
}
void loop() {
Serial.println("Sending an AT commands");
esp8266.println("AT");
delay(30);
while(esp8266.available()) {
String data = esp8266.readStringUntil('\n');
Serial.println("Got response from esp8266: " + data);
}
}