Arduino WiFi
Add WiFi(ESP8266) to Arduino UNO
If ESP-01 Adapter is used, Connect VCC=5V.
If ESP9266 module is used, Connect VCC=3.3V

Arduino sketch code
#include <SoftwareSerial.h>
SoftwareSerial ESPserial(2, 3); // RX | TX
void setup()
{
//Serial.begin(115200); // communication with the host computer
Serial.begin(9600); // communication with the host computer
//while (!Serial) { ; }
// Start the software serial for communication with the ESP8266
ESPserial.begin(115200);
//ESPserial.begin(9600); // communication with the host computer
Serial.println("");
Serial.println("Remember to to set Both NL & CR in the serial monitor.");
Serial.println("Ready");
Serial.println("");
}
void loop()
{
// listen for communication from the ESP8266 and then write it to the serial monitor
if ( ESPserial.available() ) {
//Serial.println("received");
Serial.write( ESPserial.read() ); }
// listen for user input and send it to the ESP8266
if ( Serial.available() ) {
//Serial.println("read");
ESPserial.write( Serial.read() ); }
}
First use UNO-PC Serial Baud 9600, UNO-ESP Serial Baud 115200
In Serial Monitor (Baud 9600) : Type
AT // should get OK response
AT+UART_DEF=9600,8,1,0,0 // to change UNO-ESP baudrate to 9600*
Now, we have changed ESP8266 Serial to 9600.
Modify the Arduino Sketch to ESPserial.begin(115200);
and upload again.
AT+CWMODE? // Current Connection Mode
AT+CWMODE=1 // Change Connection Mode to Mode=1 (Station mode)
AT+CWLAP // Show List of Avaiable WiFi
AT+CWJAP="SSID","๋น๋ฐ๋ฒํธ" // Connect with SSID and Password
AT+CIFSR // Check IP and MAC
ESP8266 ์์ดํ์ด ๋ชจ๋์ ๋คํธ์ํฌ ์ฐ๊ฒฐ์ ๋ํด 3๊ฐ์ง ๋ชจ๋๋ฅผ ์ ๊ณตํฉ๋๋ค.
Station mode: ESP8266 ๋ชจ๋์ด client๋ก wifi ๊ธฐ๋ฅ๋ง ํจ (๋ณธ ์์ ์์ ๋ชจ๋ 1 ์ฌ์ฉ)
AP mode: ESP8266 ๋ชจ๋์ด Access Point๊ฐ ๋จ
AP + Station mode: AP์ client ๋ ๋ค ๋จ
\

Reference
Last updated
Was this helpful?