GOAL: Sending wifi credentials to the device, getting more information on how flash of esp8266-arduino is structured
-
Install SmartConfig app from Google Play store: https://play.google.com/store/apps/details?id=com.cmmakerclub.iot.esptouch
-
Erase flash data (wifi data from previous examples) pio run --target erase
-
Deploy smart config code on esp8266:
main.cpp:
#include <ESP8266WiFi.h>
void setup() {
Serial.begin(9600);
delay(10);
WiFi.mode(WIFI_AP_STA);
delay(500);
WiFi.beginSmartConfig();
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
Serial.println(WiFi.smartConfigDone());
}
Serial.println("");
Serial.println("WiFi connected");
Serial.println("IP address: ");
Serial.println(WiFi.localIP());
}
int value = 0;
void loop() {
}
- Follow the instructions from "Smart Config" application and send wifi credentials to the device