+
+void setup() {
+ //Initialize serial and wait for port to open:
+ Serial.begin(9600);
+ while (!Serial) {
+ ; // wait for serial port to connect. Needed for native USB port only
+ }
+
+ // check for the WiFi module:
+ if (WiFi.status() == WL_NO_MODULE) {
+ Serial.println("Communication with WiFi module failed!");
+ // don't continue
+ while (true);
+ }
+
+ String fv = WiFi.firmwareVersion();
+ if (fv < WIFI_FIRMWARE_LATEST_VERSION) {
+ Serial.println("Please upgrade the firmware");
+ }
+
+ // scan for existing networks:
+ Serial.println();
+ Serial.println("Scanning available networks...");
+ listNetworks();
+
+ // print your MAC address:
+ byte mac[6];
+ WiFi.macAddress(mac);
+ Serial.print("MAC: ");
+ printMacAddress(mac);
+}
+
+void loop() {
+ delay(10000);
+ // scan for existing networks:
+ Serial.println("Scanning available networks...");
+ listNetworks();
+}
+
+void listNetworks() {
+ // scan for nearby networks:
+ Serial.println("** Scan Networks **");
+ int numSsid = WiFi.scanNetworks();
+ if (numSsid == -1)
+ {
+ Serial.println("Couldn't get a WiFi connection");
+ while (true);
+ }
+
+ // print the list of networks seen:
+ Serial.print("number of available networks: ");
+ Serial.println(numSsid);
+
+ // print the network number and name for each network found:
+ for (int thisNet = 0; thisNet < numSsid; thisNet++) {
+ Serial.print(thisNet + 1);
+ Serial.print(") ");
+ Serial.print("Signal: ");
+ Serial.print(WiFi.RSSI(thisNet));
+ Serial.print(" dBm");
+ Serial.print("\tChannel: ");
+ Serial.print(WiFi.channel(thisNet));
+ byte bssid[6];
+ Serial.print("\t\tBSSID: ");
+ printMacAddress(WiFi.BSSID(thisNet, bssid));
+ Serial.print("\tEncryption: ");
+ printEncryptionType(WiFi.encryptionType(thisNet));
+ Serial.print("\t\tSSID: ");
+ Serial.println(WiFi.SSID(thisNet));
+ Serial.flush();
+ }
+ Serial.println();
+}
+
+void printEncryptionType(int thisType) {
+ // read the encryption type and print out the name:
+ switch (thisType) {
+ case ENC_TYPE_WEP:
+ Serial.print("WEP");
+ break;
+ case ENC_TYPE_WPA:
+ Serial.print("WPA");
+ break;
+ case ENC_TYPE_WPA2:
+ Serial.print("WPA2");
+ break;
+ case ENC_TYPE_WPA3:
+ Serial.print("WPA3");
+ break;
+ case ENC_TYPE_NONE:
+ Serial.print("None");
+ break;
+ case ENC_TYPE_AUTO:
+ Serial.print("Auto");
+ break;
+ case ENC_TYPE_UNKNOWN:
+ default:
+ Serial.print("Unknown");
+ break;
+ }
+}
+
+void print2Digits(byte thisByte) {
+ if (thisByte < 0xF) {
+ Serial.print("0");
+ }
+ Serial.print(thisByte, HEX);
+}
+
+void printMacAddress(byte mac[]) {
+ for (int i = 5; i >= 0; i--) {
+ if (mac[i] < 16) {
+ Serial.print("0");
+ }
+ Serial.print(mac[i], HEX);
+ if (i > 0) {
+ Serial.print(":");
+ }
+ }
+ Serial.println();
+}
+```
+
+### Simple Webserver
+```arduino
+/*
+ WiFi Web Server LED Blink
+
+ 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 turn on and off the LED_BUILTIN.
+
+ 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.
+
+ Circuit:
+ * Arduino UNO R4 WiFi
+ * LED attached to pin 9
+
+ created 25 Nov 2012
+ by Tom Igoe
+ */
+
+#include "WiFiS3.h"
+
+#include "arduino_secrets.h"
+///////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 led = LED_BUILTIN;
+int status = WL_IDLE_STATUS;
+WiFiServer server(80);
+
+void setup() {
+ Serial.begin(9600); // initialize serial communication
+ pinMode(led, OUTPUT); // set the LED pin mode
+
+ // check for the WiFi module:
+ if (WiFi.status() == WL_NO_MODULE) {
+ Serial.println("Communication with WiFi module failed!");
+ // don't continue
+ while (true);
+ }
+
+ String fv = WiFi.firmwareVersion();
+ if (fv < WIFI_FIRMWARE_LATEST_VERSION) {
+ Serial.println("Please upgrade the firmware");
+ }
+
+ // 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);
+
+ // Connect to WPA/WPA2 network. Change this line if using open or WEP network:
+ status = WiFi.begin(ssid, pass);
+ // wait 10 seconds for connection:
+ delay(10000);
+ }
+ server.begin(); // start the web server on port 80
+ printWifiStatus(); // you're connected now, so print out the status
+}
+
+
+void loop() {
+ WiFiClient client = server.available(); // listen for incoming clients
+
+ if (client) { // if you get a client,
+ Serial.println("new client"); // print a message out the serial port
+ String currentLine = ""; // make a String to hold incoming data from the client
+ while (client.connected()) { // loop while the client's connected
+ if (client.available()) { // if there's bytes to read from the client,
+ char c = client.read(); // read a byte, then
+ Serial.write(c); // print it out to the serial monitor
+ if (c == '\n') { // if the byte is a newline character
+
+ // if the current line is blank, you got two newline characters in a row.
+ // that's the end of the client HTTP request, so send a response:
+ if (currentLine.length() == 0) {
+ // HTTP headers always start with a response code (e.g. HTTP/1.1 200 OK)
+ // and a content-type so the client knows what's coming, then a blank line:
+ client.println("HTTP/1.1 200 OK");
+ client.println("Content-type:text/html");
+ client.println();
+
+ // the content of the HTTP response follows the header:
+ client.print("Click here turn the LED on
");
+ client.print("Click here turn the LED off
");
+
+ // The HTTP response ends with another blank line:
+ client.println();
+ // break out of the while loop:
+ break;
+ } else { // if you got a newline, then clear currentLine:
+ currentLine = "";
+ }
+ } else if (c != '\r') { // if you got anything else but a carriage return character,
+ currentLine += c; // add it to the end of the currentLine
+ }
+
+ // Check to see if the client request was "GET /H" or "GET /L":
+ if (currentLine.endsWith("GET /H")) {
+ digitalWrite(LED_BUILTIN, HIGH); // GET /H turns the LED on
+ }
+ if (currentLine.endsWith("GET /L")) {
+ digitalWrite(LED_BUILTIN, LOW); // GET /L turns the LED off
+ }
+ }
+
+ }
+ // close the connection:
+ client.stop();
+ Serial.println("client disconnected");
+ }
+}
+
+void printWifiStatus() {
+ // print the SSID of the network you're attached to:
+ Serial.print("SSID: ");
+ Serial.println(WiFi.SSID());
+
+ // print your board's IP address:
+ IPAddress ip = WiFi.localIP();
+ Serial.print("IP Address: ");
+ Serial.println(ip);
+
+ // print the received signal strength:
+ long rssi = WiFi.RSSI();
+ Serial.print("signal strength (RSSI):");
+ Serial.print(rssi);
+ Serial.println(" dBm");
+ // print where to go in a browser:
+ Serial.print("To see this page in action, open a browser to http://");
+ Serial.println(ip);
+}
+```
+
+### SPI At Shell
+```arduino
+#include "Arduino.h"
+#include "SPIProtocol.h"
+
+uint16_t sizec = 0;
+uint8_t txBuffer[4096];
+uint8_t rxBuffer[4096];
+
+//void isrRead() {
+// readflag = true;
+//}
+
+#ifdef ARDUINO_PORTENTA_C33
+
+#ifndef NINA_GPIO0
+#define NINA_GPIO0 (100)
+#endif
+
+#ifndef NINA_RESETN
+#define NINA_RESETN (101)
+#endif
+
+#else
+
+
+#ifndef NINA_GPIO0
+#define NINA_GPIO0 (28)
+#endif
+
+#ifndef NINA_RESETN
+#define NINA_RESETN (29)
+#endif
+
+#endif
+void setup() {
+ Serial.begin(115200);
+
+ pinMode(NINA_GPIO0, OUTPUT);
+ pinMode(NINA_RESETN, OUTPUT);
+
+ digitalWrite(NINA_GPIO0, HIGH);
+ delay(100);
+ digitalWrite(NINA_RESETN, HIGH);
+ digitalWrite(NINA_RESETN, LOW);
+ digitalWrite(NINA_RESETN, HIGH);
+
+ spiBegin();
+}
+
+
+void loop() {
+ while (Serial.available()) {
+ txBuffer[sizec] = Serial.read();
+ sizec++;
+ }
+ if (sizec > 0) {
+ Serial.println("sending");
+ sizec *= 8;
+ writeToSlave(txBuffer, &sizec);
+ sizec = 0;
+ }
+ uint8_t raedableByte = readFromSlave(rxBuffer);
+ if (raedableByte > 0) {
+ for (int i = 0; i < raedableByte; i++) {
+ Serial.print(char(rxBuffer[i]));
+ }
+ }
+}
+```
+
+### Wi-Fi® Chat Server
+```arduino
+/*
+ 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.
+ 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.
+
+
+ Circuit:
+ * Arduino UNO R4 WiFi
+
+ created 18 Dec 2009
+ by David A. Mellis
+ modified 31 May 2012
+ by Tom Igoe
+
+ */
+
+
+#include
+
+#include "arduino_secrets.h"
+///////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 status = WL_IDLE_STATUS;
+
+WiFiServer server(23);
+
+boolean alreadyConnected = false; // whether or not the client was connected previously
+
+void setup() {
+ //Initialize serial and wait for port to open:
+ Serial.begin(9600);
+ while (!Serial) {
+ ; // wait for serial port to connect. Needed for native USB port only
+ }
+
+ // check for the WiFi module:
+ if (WiFi.status() == WL_NO_MODULE) {
+ Serial.println("Communication with WiFi module failed!");
+ // don't continue
+ while (true);
+ }
+
+ String fv = WiFi.firmwareVersion();
+ if (fv < WIFI_FIRMWARE_LATEST_VERSION) {
+ Serial.println("Please upgrade the firmware");
+ }
+
+ // attempt to connect to WiFi network:
+ while (status != WL_CONNECTED) {
+ Serial.print("Attempting to connect to SSID: ");
+ Serial.println(ssid);
+ // Connect to WPA/WPA2 network. Change this line if using open or WEP network:
+ status = WiFi.begin(ssid, pass);
+
+ // wait 10 seconds for connection:
+ delay(10000);
+ }
+
+ // start the server:
+ server.begin();
+ // you're connected now, so print out the status:
+ printWifiStatus();
+}
+
+
+void loop() {
+
+ // wait for a new client:
+ WiFiClient client = server.available();
+
+
+ // when the client sends the first byte, say hello:
+ if (client) {
+ if (!alreadyConnected) {
+ // clear out the input buffer:
+ client.flush();
+ Serial.println("We have a new client");
+ client.println("Hello, client!");
+ alreadyConnected = true;
+ }
+
+ if (client.available() > 0) {
+ // read the bytes incoming from the client:
+ char thisChar = client.read();
+ // echo the bytes back to the client:
+ server.write(thisChar);
+ // echo the bytes to the server as well:
+ Serial.write(thisChar);
+ }
+ }
+}
+
+
+void printWifiStatus() {
+ // print the SSID of the network you're attached to:
+ Serial.print("SSID: ");
+ Serial.println(WiFi.SSID());
+
+ // print your board's IP address:
+ IPAddress ip = WiFi.localIP();
+ Serial.print("IP Address: ");
+ Serial.println(ip);
+
+ // print the received signal strength:
+ long rssi = WiFi.RSSI();
+ Serial.print("signal strength (RSSI):");
+ Serial.print(rssi);
+ Serial.println(" dBm");
+}
+```
+
+### Wi-Fi® UDP NTP Client
+```arduino
+/*
+ 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.
+ 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.
+
+
+ Circuit:
+ * Arduino UNO R4 WiFi
+
+ created 18 Dec 2009
+ by David A. Mellis
+ modified 31 May 2012
+ by Tom Igoe
+
+ */
+
+
+#include
+
+#include "arduino_secrets.h"
+///////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 status = WL_IDLE_STATUS;
+
+WiFiServer server(23);
+
+boolean alreadyConnected = false; // whether or not the client was connected previously
+
+void setup() {
+ //Initialize serial and wait for port to open:
+ Serial.begin(9600);
+ while (!Serial) {
+ ; // wait for serial port to connect. Needed for native USB port only
+ }
+
+ // check for the WiFi module:
+ if (WiFi.status() == WL_NO_MODULE) {
+ Serial.println("Communication with WiFi module failed!");
+ // don't continue
+ while (true);
+ }
+
+ String fv = WiFi.firmwareVersion();
+ if (fv < WIFI_FIRMWARE_LATEST_VERSION) {
+ Serial.println("Please upgrade the firmware");
+ }
+
+ // attempt to connect to WiFi network:
+ while (status != WL_CONNECTED) {
+ Serial.print("Attempting to connect to SSID: ");
+ Serial.println(ssid);
+ // Connect to WPA/WPA2 network. Change this line if using open or WEP network:
+ status = WiFi.begin(ssid, pass);
+
+ // wait 10 seconds for connection:
+ delay(10000);
+ }
+
+ // start the server:
+ server.begin();
+ // you're connected now, so print out the status:
+ printWifiStatus();
+}
+
+
+void loop() {
+
+ // wait for a new client:
+ WiFiClient client = server.available();
+
+
+ // when the client sends the first byte, say hello:
+ if (client) {
+ if (!alreadyConnected) {
+ // clear out the input buffer:
+ client.flush();
+ Serial.println("We have a new client");
+ client.println("Hello, client!");
+ alreadyConnected = true;
+ }
+
+ if (client.available() > 0) {
+ // read the bytes incoming from the client:
+ char thisChar = client.read();
+ // echo the bytes back to the client:
+ server.write(thisChar);
+ // echo the bytes to the server as well:
+ Serial.write(thisChar);
+ }
+ }
+}
+
+
+void printWifiStatus() {
+ // print the SSID of the network you're attached to:
+ Serial.print("SSID: ");
+ Serial.println(WiFi.SSID());
+
+ // print your board's IP address:
+ IPAddress ip = WiFi.localIP();
+ Serial.print("IP Address: ");
+ Serial.println(ip);
+
+ // print the received signal strength:
+ long rssi = WiFi.RSSI();
+ Serial.print("signal strength (RSSI):");
+ Serial.print(rssi);
+ Serial.println(" dBm");
+}
+```
+
+### Wi-Fi® UDP Send Receive String
+
+```arduino
+/*
+ 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.
+ 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.
+
+
+ Circuit:
+ * Arduino UNO R4 WiFi
+
+ created 18 Dec 2009
+ by David A. Mellis
+ modified 31 May 2012
+ by Tom Igoe
+
+ */
+
+
+#include
+
+#include "arduino_secrets.h"
+///////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 status = WL_IDLE_STATUS;
+
+WiFiServer server(23);
+
+boolean alreadyConnected = false; // whether or not the client was connected previously
+
+void setup() {
+ //Initialize serial and wait for port to open:
+ Serial.begin(9600);
+ while (!Serial) {
+ ; // wait for serial port to connect. Needed for native USB port only
+ }
+
+ // check for the WiFi module:
+ if (WiFi.status() == WL_NO_MODULE) {
+ Serial.println("Communication with WiFi module failed!");
+ // don't continue
+ while (true);
+ }
+
+ String fv = WiFi.firmwareVersion();
+ if (fv < WIFI_FIRMWARE_LATEST_VERSION) {
+ Serial.println("Please upgrade the firmware");
+ }
+
+ // attempt to connect to WiFi network:
+ while (status != WL_CONNECTED) {
+ Serial.print("Attempting to connect to SSID: ");
+ Serial.println(ssid);
+ // Connect to WPA/WPA2 network. Change this line if using open or WEP network:
+ status = WiFi.begin(ssid, pass);
+
+ // wait 10 seconds for connection:
+ delay(10000);
+ }
+
+ // start the server:
+ server.begin();
+ // you're connected now, so print out the status:
+ printWifiStatus();
+}
+
+
+void loop() {
+
+ // wait for a new client:
+ WiFiClient client = server.available();
+
+
+ // when the client sends the first byte, say hello:
+ if (client) {
+ if (!alreadyConnected) {
+ // clear out the input buffer:
+ client.flush();
+ Serial.println("We have a new client");
+ client.println("Hello, client!");
+ alreadyConnected = true;
+ }
+
+ if (client.available() > 0) {
+ // read the bytes incoming from the client:
+ char thisChar = client.read();
+ // echo the bytes back to the client:
+ server.write(thisChar);
+ // echo the bytes to the server as well:
+ Serial.write(thisChar);
+ }
+ }
+}
+
+
+void printWifiStatus() {
+ // print the SSID of the network you're attached to:
+ Serial.print("SSID: ");
+ Serial.println(WiFi.SSID());
+
+ // print your board's IP address:
+ IPAddress ip = WiFi.localIP();
+ Serial.print("IP Address: ");
+ Serial.println(ip);
+
+ // print the received signal strength:
+ long rssi = WiFi.RSSI();
+ Serial.print("signal strength (RSSI):");
+ Serial.print(rssi);
+ Serial.println(" dBm");
+}
+```
+
+### Wi-Fi® Web Client
+```arduino
+/*
+ Web client
+
+ This sketch connects to a website (http://www.google.com)
+ using the WiFi module.
+
+ This example is written for a network using WPA encryption. For
+ WEP or WPA, change the WiFi.begin() call accordingly.
+
+ This example is written for a network using WPA encryption. For
+ WEP or WPA, change the WiFi.begin() call accordingly.
+
+
+ created 13 July 2010
+ by dlf (Metodo2 srl)
+ modified 31 May 2012
+ by Tom Igoe
+ */
+
+
+#include "WiFiS3.h"
+
+
+#include "arduino_secrets.h"
+
+///////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 status = WL_IDLE_STATUS;
+// if you don't want to use DNS (and reduce your sketch size)
+// use the numeric IP instead of the name for the server:
+//IPAddress server(74,125,232,128); // numeric IP for Google (no DNS)
+char server[] = "www.google.com"; // name address for Google (using DNS)
+
+// Initialize the Ethernet client library
+// with the IP address and port of the server
+// that you want to connect to (port 80 is default for HTTP):
+WiFiClient client;
+
+/* -------------------------------------------------------------------------- */
+void setup() {
+/* -------------------------------------------------------------------------- */
+ //Initialize serial and wait for port to open:
+ Serial.begin(9600);
+ while (!Serial) {
+ ; // wait for serial port to connect. Needed for native USB port only
+ }
+
+ // check for the WiFi module:
+ if (WiFi.status() == WL_NO_MODULE) {
+ Serial.println("Communication with WiFi module failed!");
+ // don't continue
+ while (true);
+ }
+
+ String fv = WiFi.firmwareVersion();
+ if (fv < WIFI_FIRMWARE_LATEST_VERSION) {
+ Serial.println("Please upgrade the firmware");
+ }
+
+ // attempt to connect to WiFi network:
+ while (status != WL_CONNECTED) {
+ Serial.print("Attempting to connect to SSID: ");
+ Serial.println(ssid);
+ // Connect to WPA/WPA2 network. Change this line if using open or WEP network:
+ status = WiFi.begin(ssid, pass);
+
+ // wait 10 seconds for connection:
+ delay(10000);
+ }
+
+ printWifiStatus();
+
+ Serial.println("\nStarting connection to server...");
+ // if you get a connection, report back via serial:
+ if (client.connect(server, 80)) {
+ Serial.println("connected to server");
+ // Make a HTTP request:
+ client.println("GET /search?q=arduino HTTP/1.1");
+ client.println("Host: www.google.com");
+ client.println("Connection: close");
+ client.println();
+ }
+}
+
+/* just wrap the received data up to 80 columns in the serial print*/
+/* -------------------------------------------------------------------------- */
+void read_response() {
+/* -------------------------------------------------------------------------- */
+ uint32_t received_data_num = 0;
+ while (client.available()) {
+ /* actual data reception */
+ char c = client.read();
+ /* print data to serial port */
+ Serial.print(c);
+ /* wrap data to 80 columns*/
+ received_data_num++;
+ if(received_data_num % 80 == 0) {
+ Serial.println();
+ }
+ }
+}
+
+/* -------------------------------------------------------------------------- */
+void loop() {
+/* -------------------------------------------------------------------------- */
+ read_response();
+
+ // if the server's disconnected, stop the client:
+ if (!client.connected()) {
+ Serial.println();
+ Serial.println("disconnecting from server.");
+ client.stop();
+
+ // do nothing forevermore:
+ while (true);
+ }
+}
+
+/* -------------------------------------------------------------------------- */
+void printWifiStatus() {
+/* -------------------------------------------------------------------------- */
+ // print the SSID of the network you're attached to:
+ Serial.print("SSID: ");
+ Serial.println(WiFi.SSID());
+
+ // print your board's IP address:
+ IPAddress ip = WiFi.localIP();
+ Serial.print("IP Address: ");
+ Serial.println(ip);
+
+ // print the received signal strength:
+ long rssi = WiFi.RSSI();
+ Serial.print("signal strength (RSSI):");
+ Serial.print(rssi);
+ Serial.println(" dBm");
+}
+```
+
+### Wi-Fi® Web Client Repeating
+```arduino
+/*
+ Repeating WiFi Web Client
+
+ This sketch connects to a a web server and makes a request
+ using a WiFi equipped Arduino board.
+
+ created 23 April 2012
+ modified 31 May 2012
+ by Tom Igoe
+ modified 13 Jan 2014
+ by Federico Vanzati
+
+ http://www.arduino.cc/en/Tutorial/WifiWebClientRepeating
+ This code is in the public domain.
+ */
+
+#include "WiFiS3.h"
+
+
+#include "arduino_secrets.h"
+///////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 status = WL_IDLE_STATUS;
+
+// Initialize the WiFi client library
+WiFiClient client;
+
+// server address:
+char server[] = "example.org";
+//IPAddress server(64,131,82,241);
+
+unsigned long lastConnectionTime = 0; // last time you connected to the server, in milliseconds
+const unsigned long postingInterval = 10L * 1000L; // delay between updates, in milliseconds
+
+/* -------------------------------------------------------------------------- */
+void setup() {
+/* -------------------------------------------------------------------------- */
+ //Initialize serial and wait for port to open:
+ Serial.begin(9600);
+ while (!Serial) {
+ ; // wait for serial port to connect. Needed for native USB port only
+ }
+
+ // check for the WiFi module:
+ if (WiFi.status() == WL_NO_MODULE) {
+ Serial.println("Communication with WiFi module failed!");
+ // don't continue
+ while (true);
+ }
+
+ String fv = WiFi.firmwareVersion();
+ if (fv < WIFI_FIRMWARE_LATEST_VERSION) {
+ Serial.println("Please upgrade the firmware");
+ }
+
+ // attempt to connect to WiFi network:
+ while (status != WL_CONNECTED) {
+ Serial.print("Attempting to connect to SSID: ");
+ Serial.println(ssid);
+ // Connect to WPA/WPA2 network. Change this line if using open or WEP network:
+ status = WiFi.begin(ssid, pass);
+
+ // wait 10 seconds for connection:
+ //delay(10000);
+ }
+ // you're connected now, so print out the status:
+ printWifiStatus();
+}
+
+/* just wrap the received data up to 80 columns in the serial print*/
+/* -------------------------------------------------------------------------- */
+void read_request() {
+/* -------------------------------------------------------------------------- */
+ uint32_t received_data_num = 0;
+
+ while (client.available()) {
+ /* actual data reception */
+ char c = client.read();
+ /* print data to serial port */
+ Serial.print(c);
+ /* wrap data to 80 columns*/
+ received_data_num++;
+ if(received_data_num % 80 == 0) {
+
+ }
+
+ }
+}
+
+/* -------------------------------------------------------------------------- */
+void loop() {
+/* -------------------------------------------------------------------------- */
+ // if there's incoming data from the net connection.
+ // send it out the serial port. This is for debugging
+ // purposes only:
+ read_request();
+
+ // if ten seconds have passed since your last connection,
+ // then connect again and send data:
+ if (millis() - lastConnectionTime > postingInterval) {
+ httpRequest();
+ }
+
+}
+
+// this method makes a HTTP connection to the server:
+/* -------------------------------------------------------------------------- */
+void httpRequest() {
+/* -------------------------------------------------------------------------- */
+ // close any connection before send a new request.
+ // This will free the socket on the NINA module
+ client.stop();
+
+ // if there's a successful connection:
+ if (client.connect(server, 80)) {
+ Serial.println("connecting...");
+ // send the HTTP GET request:
+ client.println("GET / HTTP/1.1");
+ client.println("Host: example.org");
+ client.println("User-Agent: ArduinoWiFi/1.1");
+ client.println("Connection: close");
+ client.println();
+ // note the time that the connection was made:
+ lastConnectionTime = millis();
+ } else {
+ // if you couldn't make a connection:
+ Serial.println("connection failed");
+ }
+}
+
+/* -------------------------------------------------------------------------- */
+void printWifiStatus() {
+/* -------------------------------------------------------------------------- */
+ // print the SSID of the network you're attached to:
+ Serial.print("SSID: ");
+ Serial.println(WiFi.SSID());
+
+ // print your board's IP address:
+ IPAddress ip = WiFi.localIP();
+ Serial.print("IP Address: ");
+ Serial.println(ip);
+
+ // print the received signal strength:
+ long rssi = WiFi.RSSI();
+ Serial.print("signal strength (RSSI):");
+ Serial.print(rssi);
+ Serial.println(" dBm");
+}
+```
+
+### Wi-Fi® Web Server
+```arduino
+/*
+ WiFi Web Server
+
+ A simple web server that shows the value of the analog input pins.
+
+ This example is written for a network using WPA encryption. For
+ WEP or WPA, change the WiFi.begin() call accordingly.
+
+ Circuit:
+ * Analog inputs attached to pins A0 through A5 (optional)
+
+ created 13 July 2010
+ by dlf (Metodo2 srl)
+ modified 31 May 2012
+ by Tom Igoe
+
+ */
+
+#include "WiFiS3.h"
+
+
+
+#include "arduino_secrets.h"
+///////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 status = WL_IDLE_STATUS;
+
+WiFiServer server(80);
+
+void setup() {
+ //Initialize serial and wait for port to open:
+ Serial.begin(9600);
+ while (!Serial) {
+ ; // wait for serial port to connect. Needed for native USB port only
+ }
+
+ // check for the WiFi module:
+ if (WiFi.status() == WL_NO_MODULE) {
+ Serial.println("Communication with WiFi module failed!");
+ // don't continue
+ while (true);
+ }
+
+ String fv = WiFi.firmwareVersion();
+ if (fv < WIFI_FIRMWARE_LATEST_VERSION) {
+ Serial.println("Please upgrade the firmware");
+ }
+
+ // attempt to connect to WiFi network:
+ while (status != WL_CONNECTED) {
+ Serial.print("Attempting to connect to SSID: ");
+ Serial.println(ssid);
+ // Connect to WPA/WPA2 network. Change this line if using open or WEP network:
+ status = WiFi.begin(ssid, pass);
+
+ // wait 10 seconds for connection:
+ delay(10000);
+ }
+ server.begin();
+ // you're connected now, so print out the status:
+ printWifiStatus();
+}
+
+
+void loop() {
+ // listen for incoming clients
+ WiFiClient client = server.available();
+ if (client) {
+ Serial.println("new client");
+ // an HTTP request ends with a blank line
+ boolean currentLineIsBlank = true;
+ while (client.connected()) {
+ if (client.available()) {
+ char c = client.read();
+ Serial.write(c);
+ // if you've gotten to the end of the line (received a newline
+ // character) and the line is blank, the HTTP request has ended,
+ // so you can send a reply
+ if (c == '\n' && currentLineIsBlank) {
+ // send a standard HTTP response header
+ client.println("HTTP/1.1 200 OK");
+ client.println("Content-Type: text/html");
+ client.println("Connection: close"); // the connection will be closed after completion of the response
+ client.println("Refresh: 5"); // refresh the page automatically every 5 sec
+ client.println();
+ client.println("");
+ client.println("");
+ // output the value of each analog input pin
+ for (int analogChannel = 0; analogChannel < 6; analogChannel++) {
+ int sensorReading = analogRead(analogChannel);
+ client.print("analog input ");
+ client.print(analogChannel);
+ client.print(" is ");
+ client.print(sensorReading);
+ client.println("
");
+ }
+ client.println("");
+ break;
+ }
+ if (c == '\n') {
+ // you're starting a new line
+ currentLineIsBlank = true;
+ } else if (c != '\r') {
+ // you've gotten a character on the current line
+ currentLineIsBlank = false;
+ }
+ }
+ }
+ // give the web browser time to receive the data
+ delay(1);
+
+ // close the connection:
+ client.stop();
+ Serial.println("client disconnected");
+ }
+}
+
+
+void printWifiStatus() {
+ // print the SSID of the network you're attached to:
+ Serial.print("SSID: ");
+ Serial.println(WiFi.SSID());
+
+ // print your board's IP address:
+ IPAddress ip = WiFi.localIP();
+ Serial.print("IP Address: ");
+ Serial.println(ip);
+
+ // print the received signal strength:
+ long rssi = WiFi.RSSI();
+ Serial.print("signal strength (RSSI):");
+ Serial.print(rssi);
+ Serial.println(" dBm");
+}
+```
diff --git a/static/resources/datasheets/esp32-s3-mini.pdf b/static/resources/datasheets/esp32-s3-mini.pdf
new file mode 100644
index 0000000000..6e2f5d788d
Binary files /dev/null and b/static/resources/datasheets/esp32-s3-mini.pdf differ
diff --git a/static/resources/datasheets/ra4m1.pdf b/static/resources/datasheets/ra4m1.pdf
new file mode 100644
index 0000000000..2fad116a41
Binary files /dev/null and b/static/resources/datasheets/ra4m1.pdf differ