Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void setup_wifi() {
- delay(10);
- // We start by connecting to a WiFi network
- Serial.println();
- Serial.print("Connecting to ");
- Serial.println(wifi_ssid);
- //Connect to WiFi network so we can reach the MQTT broker and publish messages to topics.
- WiFi.mode(WIFI_STA);
- WiFi.begin(wifi_ssid, wifi_password);
- while (WiFi.status() != WL_CONNECTED) {
- delay(500);
- Serial.print(".");
- }
- Serial.println("");
- Serial.print(F("WiFi connected, "));
- Serial.print(F("IP address: "));
- Serial.println(WiFi.localIP());
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement