I have some very limited experience in getting micro controllers connected to the wifi, specifically in Pedro’s Critical Objects class in which we all connected an esp32 board to an NTP server in order to print out the time on the serial monitor. If anything, this experience was even more straight forward in that the Arduino does not require as many hoops to hop thru as the particular esp32’s did. I should also note that I did this homework at home, so this was not thru sandbox.
I used one of my 33iot’s and the first example I tried was “simple web server” and I really struggled at getting it to work.

This looked pretty ok from the serial monitor.

This is what I would see anytime I tried to access the page.
I realized I was using the access point version of the sample code, and that it was creating an access point with an identical name to my wifi and password. I thought that maybe using the same wifi and password might have caused some sort of connection issue for my devices, so I tried separate names and I still could not get it to work. I may try again to fix this later and will update the blog if so, but this is where this currently stands.
After this mix up, I tried the wifi scanner which worked well immediately.

This is where I learned that wifi signals are quantified by the “decibel-milliwatt”.
I found this video that explains dBm more in-depth, because I got curious why the arduino was reporting negative numbers in regards to the signal strength of all of these networks. It turns out -50dBm is less than 1 milliwatt but not actually a negative number.
I tried the example which accesses google.com:

Afterwards, I felt more confident that the wifi was indeed working, so I tried the wifi simple webserver and reconfigured the led from pin 9 to the onboard one:
After this I wanted to write code that was inspired by Pedro’s example of getting the time from an NTP server. Specifically, I used pool.ntp.org. This was also something I used chatGPT to help me with the code, as I was also unfamiliar with some of the libraries I needed to include. I also wanted to make sure it converted UTC to EST.
#include <SPI.h>#include <WiFiNINA.h>#include <WiFiUdp.h>#include <NTPClient.h>#include "arduino.secrets.h"
// arduino_secrets.h should contain:// #define SECRET_SSID "your_wifi_name"// #define SECRET_PASS "your_wifi_password"
char ssid[] = SECRET_SSID;char pass[] = SECRET_PASS;
WiFiUDP ntpUDP;
// Eastern Time = UTC -5 hours standard, -4 hours during DST// For simplicity, use -5 * 3600 seconds (no DST adjustment)const long utcOffsetInSeconds = -5 * 3600;
NTPClient timeClient(ntpUDP, "pool.ntp.org", utcOffsetInSeconds, 60000);
void setup() { Serial.begin(9600); while (!Serial);
Serial.println("Connecting to WiFi..."); WiFi.begin(ssid, pass);
while (WiFi.status() != WL_CONNECTED) { delay(500); Serial.print("."); }
Serial.println("\\nConnected to WiFi"); Serial.print("IP Address: "); Serial.println(WiFi.localIP());
timeClient.begin();}
void loop() { timeClient.update(); Serial.println(timeClient.getFormattedTime()); delay(5000);}