1/*
2 * Circuits4you.com
3 * Get MAC Address of ESP8266 in Arduino IDE
4*/
5#include <ESP8266WiFi.h>
6
7 const char* wifiName = "circuits4you.com";
8 const char* wifiPass = "your_password";
9
10// the setup function runs once when you press reset or power the board
11void setup() {
12
13 delay(10);
14 // We start by connecting to a WiFi network
15 Serial.println();
16 Serial.print("ESP8266 MAC: ");
17 Serial.println(WiFi.macAddress());
18 Serial.print("Connecting to ");
19 Serial.println(wifiName);
20
21 WiFi.begin(wifiName, wifiPass);
22
23 while (WiFi.status() != WL_CONNECTED) {
24 delay(500);
25 Serial.print(".");
26 }
27
28 Serial.println("");
29 Serial.println("WiFi connected");
30 Serial.println("IP address: ");
31 Serial.println(WiFi.localIP());
32}
33
34// the loop function runs over and over again forever
35void loop() {
36}