ESP32 – Get in touch!
April 30th, 2019 10:18 PM | by Alfred Markus Paar | Posted in Elektronik
Open up Arduino IDE. The following code just connects to a WiFi network and return the status via serial.
Check out the Serial Monitor after uploading: Tools>SerialMonitor
#include "WiFi.h"
const char* ssid = "my-network";
const char* pw = "my-password";
void setup()
{
Serial.begin(115200);
WiFi.begin(ssid, pw);
while(WiFi.status() != WL_CONNECTED)
{
delay(500);
Serial.println("Connecting to WiFi...");
}
Serial.println("Connected to WiFi network");
}
void loop()
{
}
Leave a Reply