Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <WiFi.h>
- #include <ESPAsyncWebServer.h>
- const char* ssid = "AP_punye_dani";
- const char* password = "test";
- AsyncWebServer server(80);
- void setup() {
- Serial.begin(115200);
- WiFi.mode(WIFI_AP);
- WiFi.softAP(ssid, password);
- Serial.println();
- Serial.print("Access Point Berjalan, SSID: ");
- Serial.println(ssid);
- IPAddress IP = WiFi.softAPIP();
- Serial.print("IP Address: ");
- Serial.println(IP);
- server.on("/", HTTP_GET, [](AsyncWebServerRequest *request) {
- request->send(200, "text/html", "<h1>Selamat datang di Indobot Academy Access Point!</h1>");
- });
- server.begin();
- }
- void loop() {
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement