Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#include <ESP8266WiFi.h>
#define AP
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
#ifdef AP
Serial.println("Access Point");
WiFi.mode(WIFI_AP);
WiFi.softAP("testAP", "", 1, false, 1);
#else
Serial.println("Station");
// WiFi.mode(WIFI_STA);
WiFi.begin("siec", "haslo");
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println("");
Serial.println("WiFi connected");
Serial.println("IP address: ");
Serial.println(WiFi.localIP());
}
#endif
}
void loop() {
// put your main code here, to run repeatedly:
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.