Skip to content

Commit

Permalink
declare wifi mode prior to connect
Browse files Browse the repository at this point in the history
must have statement for current Arduino Framework, see also knolleary#138 (comment)
  • Loading branch information
leojz committed Dec 24, 2019
1 parent 7dd2ff9 commit d88909d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions examples/mqtt_esp8266/mqtt_esp8266.ino
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ void setup_wifi() {
Serial.print("Connecting to ");
Serial.println(ssid);

WiFi.mode(WIFI_STA);
WiFi.begin(ssid, password);

while (WiFi.status() != WL_CONNECTED) {
Expand Down

0 comments on commit d88909d

Please sign in to comment.