Download Print this page

DFRobot FireBeetle ESP32-E Manual page 25

Advertisement

/*
WiFiAccessPoint.ino Create a wifi hotspot, and provide a web service
Steps:
1. Connect to the wifi "yourAp"
2. Visit http://192.168.4.1/H to turn on the LED; Visit http://192.168.4.1/L to turn off the LED
OR
Run raw TCP "GET /H" and "GET /L" on PuTTY terminal with 192.168.4.1 as IP address and 80 as port
*/
#include <WiFi.h>
#include <WiFiClient.h>
#include <WiFiAP.h>
// Set your wifi and password
const char *ssid = "esp32";
const char *password = "";
WiFiServer server(80);
void setup() {
pinMode(LED_BUILTIN, OUTPUT);//Set pin LED to output mode
Serial.begin(115200);
Serial.println();
Serial.println("Configuring access point...");
// Configure wifi and get IP address
WiFi.softAP(ssid, password);
IPAddress myIP = WiFi.softAPIP();
Serial.print("AP IP address: ");
Serial println(myIP);

Advertisement

loading
Need help?

Need help?

Do you have a question about the FireBeetle ESP32-E and is the answer not in the manual?

Questions and answers

Related Products for DFRobot FireBeetle ESP32-E

This manual is also suitable for:

Dfr0654