This project shows you how to use an LED to notify users when the Arduino Uno with Wifi has connected to the wireless network.
Functional Parts in the Project:
- Arduino WiFi Rev 2 – https://store.arduino.cc/usa/arduino-uno-wifi-rev2
- Breadboard Kit – https://amzn.to/2Xih5ei
- 560 Piece Jumper Wire Kit – https://amzn.to/2MsCLjL
- LED Kit – https://amzn.to/2Rjhs2N
- 220 Ohm Resistors – https://amzn.to/2RiiMD9
#include <SPI.h>
#include <WiFiNINA.h>
#define wifiConnect 8
char ssid[] = "test";
char pass[] = "";
int keyIndex = 0;
int status = WL_IDLE_STATUS;
WiFiServer server(80);
void setup() {
pinMode(wifiConnect, OUTPUT);
Serial.begin(9600);
while (status != WL_CONNECTED) {
Serial.print("Attempting to connect to Network named: ");
Serial.println(ssid);
status = WiFi.begin(ssid, pass);
delay(10000);
}
server.begin();
digitalWrite(wifiConnect, HIGH);
Serial.print("SSID: ");
Serial.println(WiFi.SSID());
IPAddress ip = WiFi.localIP();
Serial.print("IP Address: ");
Serial.println(ip);
}
void loop() {
}
Be the first to comment