2020年10月19日 星期一

ESP32 Auto Connected WIFI

 利用手機WIFI 來使ESP32 自動連上WIFI 

ESP32 --> SSID : esp32ap  Pass:12345678




查IP位置 ESP32 AP  Gate Way  172.217.28.1  IP:  172.217.28.2  

AutoConnect root URL via http://{localIP}/_ac. (eg. http://172.217.28.1/_ac

進入AtuoConnect   172.217.28.1/_ac

進入root URL後畫面
  • Configure new AP: Configure SSID and Password for new access point.
  • Open SSIDs: Opens the past SSID which has been established connection from the flash.
  • Disconnect: Disconnects current connection.
  • Reset...: Rest the ESP8266/ESP32 module.
  • Update: OTA updates. (Optional)
  • HOME: Return to user home page.

進入Configure new AP 連結到你的SSID 
Apply 後 查看 ESP32 GateWay 變成192.168.1.1  IP : 192.168.1.100
已經連上74170287 SSID了



  • HOME: Return to user home page. 
  • 172.217.28.1 root home page
  • void rootPage() {
  •   char content[] = "Hello, world";
  •   Server.send(200, "text/plain", content);
  • }



Arduino ESP32 程式

#include <WiFi.h>

#include <WebServer.h>

#include <AutoConnect.h>

WebServer Server;

AutoConnect  Portal(Server);

void rootPage() {

  char content[] = "Hello, world";

  Server.send(200, "text/plain", content);

}

void setup() {

  delay(1000);

  Serial.begin(115200);

  Serial.println();

  Server.on("/", rootPage);

  if (Portal.begin()) {

    Serial.println("HTTP server:" + WiFi.localIP().toString());

  }

}

void loop() {

  Portal.handleClient();

}






沒有留言:

張貼留言

2024產專班 作業2 (純模擬)

2024產專班 作業2  (純模擬) 1) LED ON,OFF,TIMER,FLASH 模擬 (switch 控制) 2)RFID卡號模擬 (buttom  模擬RFID UID(不從ESP32) Node-Red 程式 [{"id":"d8886...