The ESP8266 ESP-02 WiFi Module is a self-contained wireless network controller that can add internet connectivity to your projects. Based on the popular ESP8266 chipset, the ESP-02 variant is known for its small form factor and robust feature set. This module is widely used in the Internet of Things (IoT) applications, home automation systems, and for creating smart devices that can communicate over the internet.
Pin Number | Name | Description |
---|---|---|
1 | GND | Ground |
2 | GPIO0 | General Purpose Input/Output 0 |
3 | GPIO2 | General Purpose Input/Output 2 |
4 | RX | UART Receive Pin |
5 | TX | UART Transmit Pin |
6 | CH_PD | Chip Power-Down Pin |
7 | VCC | Power Supply (3.3V) |
#include <ESP8266WiFi.h>
// Replace with your network credentials
const char* ssid = "your_SSID";
const char* password = "your_PASSWORD";
void setup() {
Serial.begin(115200); // Start serial communication at 115200 bps
WiFi.begin(ssid, password); // Connect to the WiFi network
while (WiFi.status() != WL_CONNECTED) { // Wait for connection
delay(500);
Serial.print(".");
}
Serial.println("");
Serial.println("WiFi connected");
Serial.println("IP address: ");
Serial.println(WiFi.localIP()); // Print the local IP address
}
void loop() {
// Nothing here for this simple example
}
Q: Can I use a 5V power supply with the ESP-02?
Q: How do I reset the module?
Q: Can the ESP-02 be used with Arduino IDE?
Remember to follow all safety precautions when working with electronic components and ensure that all connections are secure before powering up your circuit.