33
44 A simple web server that lets you blink an LED via the web.
55 This sketch will print the IP address of your WiFi module (once connected)
6- to the Serial monitor . From there, you can open that address in a web browser
6+ to the Serial Monitor . From there, you can open that address in a web browser
77 to turn on and off the LED on pin 9.
88
99 If the IP address of your board is yourAddress:
1010 http://yourAddress/H turns the LED on
1111 http://yourAddress/L turns it off
1212
1313 This example is written for a network using WPA encryption. For
14- WEP or WPA, change the Wifi .begin() call accordingly.
14+ WEP or WPA, change the WiFi .begin() call accordingly.
1515
1616 Circuit:
1717 * Board with NINA module (Arduino MKR WiFi 1010, MKR VIDOR 4000 and UNO WiFi Rev.2)
2727// /////please enter your sensitive data in the Secret tab/arduino_secrets.h
2828char ssid[] = SECRET_SSID; // your network SSID (name)
2929char pass[] = SECRET_PASS; // your network password (use for WPA, or use as key for WEP)
30- int keyIndex = 0 ; // your network key Index number (needed only for WEP)
30+ int keyIndex = 0 ; // your network key index number (needed only for WEP)
3131
3232int status = WL_IDLE_STATUS;
3333WiFiServer server (80 );
@@ -48,7 +48,7 @@ void setup() {
4848 Serial.println (" Please upgrade the firmware" );
4949 }
5050
51- // attempt to connect to Wifi network:
51+ // attempt to connect to WiFi network:
5252 while (status != WL_CONNECTED) {
5353 Serial.print (" Attempting to connect to Network named: " );
5454 Serial.println (ssid); // print the network name (SSID);
@@ -110,7 +110,7 @@ void loop() {
110110 }
111111 // close the connection:
112112 client.stop ();
113- Serial.println (" client disonnected " );
113+ Serial.println (" client disconnected " );
114114 }
115115}
116116
0 commit comments