Created
May 27, 2017 15:31
-
-
Save maxpromer/0ed441c4a1b23396e79dd8bd54b619d4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include<WiFi.h> | |
| #define WIFI_STA_NAME "MaxHome3BB" | |
| #define WIFI_STA_PASS "xxxxxxxxxx" | |
| void setup() { | |
| Serial.begin(115200); | |
| pinMode(LED_BUILTIN, OUTPUT); | |
| Serial.println(); | |
| Serial.println(); | |
| Serial.print("Connecting to "); | |
| Serial.println(WIFI_STA_NAME); | |
| WiFi.mode(WIFI_STA); | |
| WiFi.begin(WIFI_STA_NAME, WIFI_STA_PASS); | |
| while (WiFi.status() != WL_CONNECTED) { | |
| delay(500); | |
| Serial.print("."); | |
| digitalWrite(LED_BUILTIN, !digitalRead(LED_BUILTIN)); | |
| } | |
| digitalWrite(LED_BUILTIN, HIGH); | |
| Serial.println(""); | |
| Serial.println("WiFi connected"); | |
| Serial.println("IP address: "); | |
| Serial.println(WiFi.localIP()); | |
| } | |
| void loop() { } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment