Sunday, April 23, 2017

Get the WiFi MAC address of ESP32 Module

This example show how to get the WiFi MAC address of ESP32 Module, using Arduino core for ESP32. In this example, I just want to know the MAC address only, without connect to any hotspot, so no ssid and password needed (or it will connect to last ssid).


ESP32_WiFi.ino
/*
 * ESP-32 Example, 
 * start WiFi (without ssid and password)
 * and print the MAC address to Serial.
 * http://arduino-er.blogspot.com/
 */

#include <WiFi.h>

byte mac[6];

void setup()
{
    Serial.begin(115200);
    delay(1000);

    Serial.println();
    Serial.print("Program Start...");

    WiFi.begin();
    Serial.println("WiFi began");
    WiFi.macAddress(mac);
    
    Serial.print("MAC: ");
    Serial.print(mac[0],HEX);
    Serial.print(":");
    Serial.print(mac[1],HEX);
    Serial.print(":");
    Serial.print(mac[2],HEX);
    Serial.print(":");
    Serial.print(mac[3],HEX);
    Serial.print(":");
    Serial.print(mac[4],HEX);
    Serial.print(":");
    Serial.println(mac[5],HEX);

}

void loop(){

}

It match with the scanned address of the wireless router.




Remark:
May be it's something wrong on my ESP32 board; sometimes the program halt on the code WiFi.begin() without return. Try to close Serial Monitor, disconnect and reconnect ESP32 USB cable, then run Serial Monitor.

Saturday, April 22, 2017

Install Arduino core for ESP32 to Arduino IDE, on Windows 10



The video show how to install Arduino core for ESP32 to Arduino IDE, on Windows 10. Basically it follow the Installation Instructions for Windows, except the Target Directory.

It's assumed you have already installed Arduino IDE, Git and suitable USB driver for your ESP32 dev board.


ref:
Arduino core for the ESP32

Example:
Get the WiFi MAC address of ESP32 Module

Tuesday, April 18, 2017

Introducing the Arduino MKRFOX1200

The MKRFOX1200 is a powerful board that combines the functionality of the Zero and Sigfox connectivity. It is the ideal solution for Makers looking to design IoT projects with minimal previous experience in networking.