Skip to content

Commit

Permalink
Fix typos in comments and Serial prints
Browse files Browse the repository at this point in the history
  • Loading branch information
per1234 committed Jan 13, 2021
1 parent 6df0e09 commit 395d147
Show file tree
Hide file tree
Showing 27 changed files with 79 additions and 114 deletions.
6 changes: 3 additions & 3 deletions examples/AP_SimpleWebServer/AP_SimpleWebServer.ino
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
A simple web server that lets you blink an LED via the web.
This sketch will create a new access point (with no password).
It will then launch a new server and print out the IP address
to the Serial monitor. From there, you can open that address in a web browser
to the Serial Monitor. From there, you can open that address in a web browser
to turn on and off the LED on pin 13.
If the IP address of your board is yourAddress:
Expand All @@ -22,7 +22,7 @@
///////please enter your sensitive data in the Secret tab/arduino_secrets.h
char ssid[] = SECRET_SSID; // your network SSID (name)
char pass[] = SECRET_PASS; // your network password (use for WPA, or use as key for WEP)
int keyIndex = 0; // your network key Index number (needed only for WEP)
int keyIndex = 0; // your network key index number (needed only for WEP)

int led = LED_BUILTIN;
int status = WL_IDLE_STATUS;
Expand Down Expand Up @@ -51,7 +51,7 @@ void setup() {
Serial.println("Please upgrade the firmware");
}

// by default the local IP address of will be 192.168.4.1
// by default the local IP address will be 192.168.4.1
// you can override it with the following:
// WiFi.config(IPAddress(10, 0, 0, 1));

Expand Down
7 changes: 3 additions & 4 deletions examples/ConnectNoEncryption/ConnectNoEncryption.ino
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/*
This example connects to an unencrypted Wifi network.
This example connects to an unencrypted WiFi network.
Then it prints the MAC address of the board,
the IP address obtained, and other network details.
Expand All @@ -15,7 +14,7 @@
#include "arduino_secrets.h"
///////please enter your sensitive data in the Secret tab/arduino_secrets.h
char ssid[] = SECRET_SSID; // your network SSID (name)
int status = WL_IDLE_STATUS; // the Wifi radio's status
int status = WL_IDLE_STATUS; // the WiFi radio's status

void setup() {
//Initialize serial and wait for port to open:
Expand All @@ -35,7 +34,7 @@ void setup() {
Serial.println("Please upgrade the firmware");
}

// attempt to connect to Wifi network:
// attempt to connect to WiFi network:
while (status != WL_CONNECTED) {
Serial.print("Attempting to connect to open SSID: ");
Serial.println(ssid);
Expand Down
11 changes: 5 additions & 6 deletions examples/ConnectWithWEP/ConnectWithWEP.ino
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/*
This example connects to a WEP-encrypted Wifi network.
Then it prints the MAC address of the Wifi module,
This example connects to a WEP-encrypted WiFi network.
Then it prints the MAC address of the WiFi module,
the IP address obtained, and other network details.
If you use 40-bit WEP, you need a key that is 10 characters long,
Expand All @@ -26,8 +25,8 @@
///////please enter your sensitive data in the Secret tab/arduino_secrets.h
char ssid[] = SECRET_SSID; // your network SSID (name)
char pass[] = SECRET_PASS; // your network password (use for WPA, or use as key for WEP)
int keyIndex = 0; // your network key Index number
int status = WL_IDLE_STATUS; // the Wifi radio's status
int keyIndex = 0; // your network key index number
int status = WL_IDLE_STATUS; // the WiFi radio's status

void setup() {
//Initialize serial and wait for port to open:
Expand All @@ -48,7 +47,7 @@ void setup() {
Serial.println("Please upgrade the firmware");
}

// attempt to connect to Wifi network:
// attempt to connect to WiFi network:
while (status != WL_CONNECTED) {
Serial.print("Attempting to connect to WEP network, SSID: ");
Serial.println(ssid);
Expand Down
9 changes: 4 additions & 5 deletions examples/ConnectWithWPA/ConnectWithWPA.ino
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/*
This example connects to an unencrypted Wifi network.
Then it prints the MAC address of the Wifi module,
This example connects to an unencrypted WiFi network.
Then it prints the MAC address of the WiFi module,
the IP address obtained, and other network details.
created 13 July 2010
Expand All @@ -16,7 +15,7 @@
///////please enter your sensitive data in the Secret tab/arduino_secrets.h
char ssid[] = SECRET_SSID; // your network SSID (name)
char pass[] = SECRET_PASS; // your network password (use for WPA, or use as key for WEP)
int status = WL_IDLE_STATUS; // the Wifi radio's status
int status = WL_IDLE_STATUS; // the WiFi radio's status

void setup() {
//Initialize serial and wait for port to open:
Expand All @@ -37,7 +36,7 @@ void setup() {
Serial.println("Please upgrade the firmware");
}

// attempt to connect to Wifi network:
// attempt to connect to WiFi network:
while (status != WL_CONNECTED) {
Serial.print("Attempting to connect to WPA SSID: ");
Serial.println(ssid);
Expand Down
11 changes: 5 additions & 6 deletions examples/ConnectWithWPA2Enterprise/ConnectWithWPA2Enterprise.ino
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
This example connects to an WPA2 Enterprise WiFi network.
Then it prints the MAC address of the WiFi module,
This example connects to a WPA2 Enterprise WiFi network.
Then it prints the MAC address of the WiFi module,
the IP address obtained, and other network details.
Based on ConnectWithWPA.ino by dlf (Metodo2 srl) and Tom Igoe
Expand All @@ -13,7 +13,7 @@
char ssid[] = SECRET_SSID; // your WPA2 enterprise network SSID (name)
char user[] = SECRET_USER; // your WPA2 enterprise username
char pass[] = SECRET_PASS; // your WPA2 enterprise password
int status = WL_IDLE_STATUS; // the Wifi radio's status
int status = WL_IDLE_STATUS; // the WiFi radio's status

void setup() {
//Initialize serial and wait for port to open:
Expand All @@ -34,14 +34,13 @@ void setup() {
Serial.println("Please upgrade the firmware");
}

// attempt to connect to Wifi network:
// attempt to connect to WiFi network:
while (status != WL_CONNECTED) {
Serial.print("Attempting to connect to WPA SSID: ");
Serial.println(ssid);
// Connect to WPA2 enterprise network:
// - You can optionally provide additional identity and CA cert (string) parameters:
// - You can optionally provide additional identity and CA cert (string) parameters if your network requires them:
// WiFi.beginEnterprise(ssid, user, pass, identity, caCert)
// . if your network requires them.
status = WiFi.beginEnterprise(ssid, user, pass);

// wait 10 seconds for connection:
Expand Down
5 changes: 2 additions & 3 deletions examples/ScanNetworks/ScanNetworks.ino
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/*
This example prints the board's MAC address, and
scans for available Wifi networks using the NINA module.
scans for available WiFi networks using the NINA module.
Every ten seconds, it scans again. It doesn't actually
connect to any network, so no encryption scheme is specified.
Expand Down Expand Up @@ -56,7 +55,7 @@ void listNetworks() {
Serial.println("** Scan Networks **");
int numSsid = WiFi.scanNetworks();
if (numSsid == -1) {
Serial.println("Couldn't get a wifi connection");
Serial.println("Couldn't get a WiFi connection");
while (true);
}

Expand Down
1 change: 0 additions & 1 deletion examples/ScanNetworksAdvanced/ScanNetworksAdvanced.ino
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/*
This example prints the board's MAC address, and
scans for available WiFi networks using the NINA module.
Every ten seconds, it scans again. It doesn't actually
Expand Down
10 changes: 5 additions & 5 deletions examples/SimpleWebServerWiFi/SimpleWebServerWiFi.ino
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
A simple web server that lets you blink an LED via the web.
This sketch will print the IP address of your WiFi module (once connected)
to the Serial monitor. From there, you can open that address in a web browser
to the Serial Monitor. From there, you can open that address in a web browser
to turn on and off the LED on pin 9.
If the IP address of your board is yourAddress:
http://yourAddress/H turns the LED on
http://yourAddress/L turns it off
This example is written for a network using WPA encryption. For
WEP or WPA, change the Wifi.begin() call accordingly.
WEP or WPA, change the WiFi.begin() call accordingly.
Circuit:
* Board with NINA module (Arduino MKR WiFi 1010, MKR VIDOR 4000 and UNO WiFi Rev.2)
Expand All @@ -27,7 +27,7 @@
///////please enter your sensitive data in the Secret tab/arduino_secrets.h
char ssid[] = SECRET_SSID; // your network SSID (name)
char pass[] = SECRET_PASS; // your network password (use for WPA, or use as key for WEP)
int keyIndex = 0; // your network key Index number (needed only for WEP)
int keyIndex = 0; // your network key index number (needed only for WEP)

int status = WL_IDLE_STATUS;
WiFiServer server(80);
Expand All @@ -48,7 +48,7 @@ void setup() {
Serial.println("Please upgrade the firmware");
}

// attempt to connect to Wifi network:
// attempt to connect to WiFi network:
while (status != WL_CONNECTED) {
Serial.print("Attempting to connect to Network named: ");
Serial.println(ssid); // print the network name (SSID);
Expand Down Expand Up @@ -110,7 +110,7 @@ void loop() {
}
// close the connection:
client.stop();
Serial.println("client disonnected");
Serial.println("client disconnected");
}
}

Expand Down
5 changes: 2 additions & 3 deletions examples/Tools/CheckFirmwareVersion/CheckFirmwareVersion.ino
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* This example check if the firmware loaded on the NINA module
* This example checks if the firmware loaded on the NINA module
* is updated.
*
* Circuit:
Expand Down Expand Up @@ -47,7 +47,7 @@ void setup() {
Serial.println("Check result: PASSED");
} else {
Serial.println("Check result: NOT PASSED");
Serial.println(" - The firmware version on the module do not match the");
Serial.println(" - The firmware version on the module does not match the");
Serial.println(" version required by the library, you may experience");
Serial.println(" issues or failures.");
}
Expand All @@ -56,4 +56,3 @@ void setup() {
void loop() {
// do nothing
}

1 change: 0 additions & 1 deletion examples/Tools/FirmwareUpdater/Endianess.ino
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,3 @@ uint32_t toNetwork32(uint32_t to) {
uint16_t toNetwork16(uint16_t to) {
return fromNetwork16(to);
}

2 changes: 1 addition & 1 deletion examples/Tools/FirmwareUpdater/FirmwareUpdater.ino
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ typedef struct __attribute__((__packed__)) {
uint32_t arg1;
uint16_t payloadLength;

// payloadLenght bytes of data follows...
// payloadLength bytes of data follows...
} UartPacket;

static const int MAX_PAYLOAD_SIZE = 1024;
Expand Down
12 changes: 5 additions & 7 deletions examples/WiFiChatServer/WiFiChatServer.ino
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
Chat Server
A simple server that distributes any incoming messages to all
connected clients. To use telnet to your device's IP address and type.
connected clients. To use, telnet to your device's IP address and type.
You can see the client's input in the serial monitor as well.
This example is written for a network using WPA encryption. For
WEP or WPA, change the Wifi.begin() call accordingly.
WEP or WPA, change the WiFi.begin() call accordingly.
Circuit:
Expand All @@ -27,7 +27,7 @@
char ssid[] = SECRET_SSID; // your network SSID (name)
char pass[] = SECRET_PASS; // your network password (use for WPA, or use as key for WEP)

int keyIndex = 0; // your network key Index number (needed only for WEP)
int keyIndex = 0; // your network key index number (needed only for WEP)

int status = WL_IDLE_STATUS;

Expand All @@ -54,7 +54,7 @@ void setup() {
Serial.println("Please upgrade the firmware");
}

// attempt to connect to Wifi network:
// attempt to connect to WiFi network:
while (status != WL_CONNECTED) {
Serial.print("Attempting to connect to SSID: ");
Serial.println(ssid);
Expand All @@ -80,7 +80,7 @@ void loop() {
// when the client sends the first byte, say hello:
if (client) {
if (!alreadyConnected) {
// clead out the input buffer:
// clear out the input buffer:
client.flush();
Serial.println("We have a new client");
client.println("Hello, client!");
Expand Down Expand Up @@ -115,5 +115,3 @@ void printWifiStatus() {
Serial.print(rssi);
Serial.println(" dBm");
}


5 changes: 2 additions & 3 deletions examples/WiFiPing/WiFiPing.ino
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/*
This example connects to a encrypted WiFi network (WPA/WPA2).
Then it prints the MAC address of the board,
This example connects to an encrypted WiFi network (WPA/WPA2).
Then it prints the MAC address of the board,
the IP address obtained, and other network details.
Then it continuously pings given host specified by IP Address or name.
Expand Down
4 changes: 2 additions & 2 deletions examples/WiFiSSLClient/WiFiSSLClient.ino
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ last revision November 2015
///////please enter your sensitive data in the Secret tab/arduino_secrets.h
char ssid[] = SECRET_SSID; // your network SSID (name)
char pass[] = SECRET_PASS; // your network password (use for WPA, or use as key for WEP)
int keyIndex = 0; // your network key Index number (needed only for WEP)
int keyIndex = 0; // your network key index number (needed only for WEP)

int status = WL_IDLE_STATUS;
// if you don't want to use DNS (and reduce your sketch size)
Expand Down Expand Up @@ -59,7 +59,7 @@ void setup() {
// wait 10 seconds for connection:
delay(10000);
}
Serial.println("Connected to wifi");
Serial.println("Connected to WiFi");
printWiFiStatus();

Serial.println("\nStarting connection to server...");
Expand Down
1 change: 0 additions & 1 deletion examples/WiFiSSLClient/arduino_secrets.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
#define SECRET_SSID ""
#define SECRET_PASS ""

2 changes: 1 addition & 1 deletion examples/WiFiStorage/WiFiStorage.ino
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
This example shows how to interact with NiNa internal memory partition
This example shows how to interact with NINA internal memory partition
APIs are modeled on SerialFlash library (not on SD) to speedup operations and avoid buffers.
*/

Expand Down
21 changes: 5 additions & 16 deletions examples/WiFiUdpNtpClient/WiFiUdpNtpClient.ino
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/*
Udp NTP Client
Get the time from a Network Time Protocol (NTP) time server
Expand All @@ -25,13 +24,13 @@ int status = WL_IDLE_STATUS;
///////please enter your sensitive data in the Secret tab/arduino_secrets.h
char ssid[] = SECRET_SSID; // your network SSID (name)
char pass[] = SECRET_PASS; // your network password (use for WPA, or use as key for WEP)
int keyIndex = 0; // your network key Index number (needed only for WEP)
int keyIndex = 0; // your network key index number (needed only for WEP)

unsigned int localPort = 2390; // local port to listen for UDP packets

IPAddress timeServer(129, 6, 15, 28); // time.nist.gov NTP server

const int NTP_PACKET_SIZE = 48; // NTP time stamp is in the first 48 bytes of the message
const int NTP_PACKET_SIZE = 48; // NTP timestamp is in the first 48 bytes of the message

byte packetBuffer[ NTP_PACKET_SIZE]; //buffer to hold incoming and outgoing packets

Expand All @@ -57,7 +56,7 @@ void setup() {
Serial.println("Please upgrade the firmware");
}

// attempt to connect to Wifi network:
// attempt to connect to WiFi network:
while (status != WL_CONNECTED) {
Serial.print("Attempting to connect to SSID: ");
Serial.println(ssid);
Expand All @@ -68,7 +67,7 @@ void setup() {
delay(10000);
}

Serial.println("Connected to wifi");
Serial.println("Connected to WiFi");
printWifiStatus();

Serial.println("\nStarting connection to server...");
Expand All @@ -85,7 +84,7 @@ void loop() {
Udp.read(packetBuffer, NTP_PACKET_SIZE); // read the packet into the buffer

//the timestamp starts at byte 40 of the received packet and is four bytes,
// or two words, long. First, esxtract the two words:
// or two words, long. First, extract the two words:

unsigned long highWord = word(packetBuffer[40], packetBuffer[41]);
unsigned long lowWord = word(packetBuffer[42], packetBuffer[43]);
Expand Down Expand Up @@ -172,13 +171,3 @@ void printWifiStatus() {
Serial.print(rssi);
Serial.println(" dBm");
}










Loading

0 comments on commit 395d147

Please sign in to comment.