Komponenter

ESP8266 ESP-07S Serial to Wifi Transceiver Module

ESP8266 ESP-07S Serial to Wifi Transceiver Module + 3DBI Antenna SMA for Arduino

https://www.youtube.com/watch?v=x-mpltUzK5I
http://www.instructables.com/howto/ESP8266/ 
Instrukser 

AT-kommandoer for konfigurasjon   Eksempler

tion of

ESP8266 ESP-07S:

802.11 b / g / n
Built Tensilica L106 ultra-low power 32-bit micro-MCU, it supports 80 MHz clock speed and 160 MHz, support for RTOS
Built-in 10 bit precision ADC
Built-in TCP / IP protocol stack
Built TR switch, balun, LNA, power amplifier and matching network
Built under the PLL, regulator and power management components, 802.11b mode +20 dBm output power
The guard interval A-MPDU, A-MSDU polymerization and 0.4 s of
WiFi @ 2.4 GHz, supports WPA / WPA2 security mode
Support remote upgrade and AT Cloud OTA upgrade
Support STA / AP / STA + AP mode
Support Smart Config function (including Android and iOS)
HSPI, UART, I2C, I2S, IR Remote Control, PWM, GPIO
Deep sleep holding current 10 uA, shutdown current is less than 5 uA
Wake within 2 ms, connect and transfer data packets
Standby power consumption is less than 1.0 mW (DTIM3)
Operating temperature range: -40 ℃ - 125 ℃

Features of ESP8266 ESP-07S:
Frequency range 2.4GHz-2.5GHz (2400M-2483.5M)
Data Connector UART / HSPI / I2C / I2S / Ir Remote Contorl
Operating Voltage GPIO / PWM
3.0 ~ 3.6V (recommendation 3.3V)
The average operating current: 80mA
Operating temperature -40 ° ~ 125 °
Storage temperature room temperature
Package size of 16mm * 21.2mm * 3mm
External Connector N / A
Wi-Fi mode station / softAP / SoftAP + station
Security mechanism WPA / WPA2
Encryption type WEP / TKIP / AES
Upgrading firmware local serial programming / Drive Upgrade / host download Burn
Custom software development support client server
To provide secondary development SDK
Network protocols IPv4, TCP / UDP / HTTP / FTP
User Configuration AT + instruction set, cloud server, Android / iOS APP

 
 
Description of Wifi Antenna:
Cable length: 16cm
Extended range 3BI Adjustable WiFi Antenna with gold plated U.FL to Female SMA connection cable. If you are looking for extended WiFi range from your ESP8266, CC3000 or other WiFi based projects then this Antenna package is what you need.

If you have a U.FL connector (the ity bity one) then use the cable, else the next most popular is the full size SMA connector in which case the 3DBI Antenna will screw on directly. 
 
 

Package Included:

1 X ESP8266 ESP-07S wifi module
1 X 3DBI WiFi Antenna
1 X U.FL to Female SMA Cable
 
change the SSID and password in code for your wifi router

#include <SoftwareSerial.h>
#define SSID "xxxxxxxx"
#define PASS "xxxxxxxx"
#define DST_IP "220.181.111.85" //baidu.com
SoftwareSerial dbgSerial(10, 11); // RX, TX
void setup()
{
// Open serial communications and wait for port to open:
Serial.begin(57600);
Serial.setTimeout(5000);
dbgSerial.begin(9600); //can't be faster than 19200 for softserial
dbgSerial.println("ESP8266 Demo");
//test if the module is ready
Serial.println("AT+RST");
delay(1000);
if (Serial.find("ready"))
{
dbgSerial.println("Module is ready");
}
else
{
dbgSerial.println("Module have no response.");
while (1);
}
delay(1000);
//connect to the wifi
boolean connected = false;
for (int i = 0; i < 5; i++)
{
if (connectWiFi())
{
connected = true;
break;
}
}
if (!connected) {
while (1);
}
delay(5000);
//print the ip addr
/*Serial.println("AT+CIFSR");
dbgSerial.println("ip address:");
while (Serial.available())
dbgSerial.write(Serial.read());*/
//set the single connection mode
Serial.println("AT+CIPMUX=0");
}
void loop()
{
String cmd = "AT+CIPSTART=\"TCP\",\"";
cmd += DST_IP;
cmd += "\",80";
Serial.println(cmd);
dbgSerial.println(cmd);
if (Serial.find("Error")) return;
cmd = "GET / HTTP/1.0\r\n\r\n";
Serial.print("AT+CIPSEND=");
Serial.println(cmd.length());
if (Serial.find(">"))
{
dbgSerial.print(">");
} else
{
Serial.println("AT+CIPCLOSE");
dbgSerial.println("connect timeout");
delay(1000);
return;
}
Serial.print(cmd);
delay(2000);
//Serial.find("+IPD");
while (Serial.available())
{
char c = Serial.read();
dbgSerial.write(c);
if (c == '\r') dbgSerial.print('\n');
}
dbgSerial.println("====");
delay(1000);
}
boolean connectWiFi()
{
Serial.println("AT+CWMODE=1");
String cmd = "AT+CWJAP=\"";
cmd += SSID;
cmd += "\",\"";
cmd += PASS;
cmd += "\"";
dbgSerial.println(cmd);
Serial.println(cmd);
delay(2000);
if (Serial.find("OK"))
{
dbgSerial.println("OK, Connected to WiFi.");
return true;
} else
{
dbgSerial.println("Can not connect to the WiFi.");
return false;
}
}