From 34218c95237582b242258e5352c9c3707257efa3 Mon Sep 17 00:00:00 2001 From: Hannes Siebeneicher Date: Mon, 21 Aug 2023 16:02:03 +0200 Subject: [PATCH 1/3] Add comments Comments have been added to the following sketches: - SineWave.ino - DisplaySingleFrame.ino - GameOfLife.ino - LivePreview.ino - MatrixFrameBuffer.ino - PlayAnimation.ino --- .../AnalogWave/examples/SineWave/SineWave.ino | 25 +++++++++--- .../DisplaySingleFrame/DisplaySingleFrame.ino | 38 ++++++++++++++----- .../examples/GameOfLife/GameOfLife.ino | 10 +++++ .../examples/LivePreview/LivePreview.ino | 19 +++++++--- .../MatrixFrameBuffer/MatrixFrameBuffer.ino | 37 +++++++++++++++++- .../examples/PlayAnimation/PlayAnimation.ino | 9 ++++- 6 files changed, 114 insertions(+), 24 deletions(-) diff --git a/libraries/AnalogWave/examples/SineWave/SineWave.ino b/libraries/AnalogWave/examples/SineWave/SineWave.ino index b64ada01e..5ec5eff6e 100644 --- a/libraries/AnalogWave/examples/SineWave/SineWave.ino +++ b/libraries/AnalogWave/examples/SineWave/SineWave.ino @@ -1,17 +1,30 @@ -#include "analogWave.h" +/* + SineWave -analogWave wave(DAC); + Generates a pre-generated sawtooth-waveform. + + See the full documentatio here: + https://docs.arduino.cc/tutorials/uno-r4-wifi/dac +*/ + +#include "analogWave.h" // Include the library for analog waveform generation + +analogWave wave(DAC); // Create an instance of the analogWave class, using the DAC pin int freq = 10; // in hertz, change accordingly void setup() { - Serial.begin(115200); - wave.sine(freq); + Serial.begin(115200); // Initialize serial communication at a baud rate of 115200 + wave.sine(freq); // Generate a sine wave with the initial frequency } void loop() { + // Read an analog value from pin A5 and map it to a frequency range freq = map(analogRead(A5), 0, 1024, 0, 10000); + + // Print the updated frequency to the serial monitor Serial.println("Frequency is now " + String(freq) + " hz"); - wave.freq(freq); - delay(1000); + + wave.freq(freq); // Set the frequency of the waveform generator to the updated value + delay(1000); // Delay for one second before repeating } \ No newline at end of file diff --git a/libraries/Arduino_LED_Matrix/examples/DisplaySingleFrame/DisplaySingleFrame.ino b/libraries/Arduino_LED_Matrix/examples/DisplaySingleFrame/DisplaySingleFrame.ino index 22da1ee38..aed801431 100644 --- a/libraries/Arduino_LED_Matrix/examples/DisplaySingleFrame/DisplaySingleFrame.ino +++ b/libraries/Arduino_LED_Matrix/examples/DisplaySingleFrame/DisplaySingleFrame.ino @@ -1,21 +1,39 @@ -#include "Arduino_LED_Matrix.h" -#include "frames.h" +/* +Single Frame -ArduinoLEDMatrix matrix; +Displays single frames using matrix.loadFrame + +See the full documentation here: +https://docs.arduino.cc/tutorials/uno-r4-wifi/led-matrix +*/ + +#include "Arduino_LED_Matrix.h" // Include the library for controlling LED matrix +#include "frames.h" // Include a header file containing frame data + +ArduinoLEDMatrix matrix; // Create an instance of the ArduinoLEDMatrix class void setup() { - Serial.begin(115200); - matrix.begin(); -} + Serial.begin(115200); // Initialize serial communication at a baud rate of 115200 + matrix.begin(); // Initialize the LED matrix +} void loop() { + // Load and display the "chip" frame on the LED matrix matrix.loadFrame(chip); - delay(500); + delay(500); // Pause for 500 milliseconds (half a second) + + // Load and display the "happy" frame on the LED matrix matrix.loadFrame(danger); - delay(500); + delay(500); // Pause for 500 milliseconds (half a second) + + // Load and display the "happy" frame on the LED matrix matrix.loadFrame(happy); - delay(500); + delay(500); // Pause for 500 milliseconds (half a second) + + // Load and display the "heart" frame on the LED matrix matrix.loadFrame(heart); - delay(500); + delay(500); // Pause for 500 milliseconds (half a second) + + // Print the current value of millis() to the serial monitor Serial.println(millis()); } diff --git a/libraries/Arduino_LED_Matrix/examples/GameOfLife/GameOfLife.ino b/libraries/Arduino_LED_Matrix/examples/GameOfLife/GameOfLife.ino index c982abd25..5c939439d 100644 --- a/libraries/Arduino_LED_Matrix/examples/GameOfLife/GameOfLife.ino +++ b/libraries/Arduino_LED_Matrix/examples/GameOfLife/GameOfLife.ino @@ -1,6 +1,16 @@ /* + Game Of Life + + The Game of Life, also known simply as Life, is a cellular automaton devised + by the British mathematician John Horton Conway in 1970. It is a zero-player game, + meaning that its evolution is determined by its initial state, requiring no further + input. + Example developed starting from Toby Oxborrow's sketch https://github.com/tobyoxborrow/gameoflife-arduino/blob/master/GameOfLife.ino + + See the full documentation here: + https://docs.arduino.cc/tutorials/uno-r4-wifi/led-matrix */ #include "Arduino_LED_Matrix.h" diff --git a/libraries/Arduino_LED_Matrix/examples/LivePreview/LivePreview.ino b/libraries/Arduino_LED_Matrix/examples/LivePreview/LivePreview.ino index 7df7f234b..160de4dd2 100644 --- a/libraries/Arduino_LED_Matrix/examples/LivePreview/LivePreview.ino +++ b/libraries/Arduino_LED_Matrix/examples/LivePreview/LivePreview.ino @@ -5,27 +5,34 @@ The LED Matrix editor is part of Arduino Labs (https://labs.arduino.cc/), and is therefore considered experimental software. Don't forget to close any serial monitor already opened. + + See the full documentation here: + https://docs.arduino.cc/tutorials/uno-r4-wifi/led-matrix */ -#include "Arduino_LED_Matrix.h" +#include "Arduino_LED_Matrix.h" // Include the library for controlling LED matrix -ArduinoLEDMatrix matrix; +ArduinoLEDMatrix matrix; // Create an instance of the ArduinoLEDMatrix class void setup() { - Serial.begin(115200); - matrix.begin(); + Serial.begin(115200); // Initialize serial communication at a baud rate of 115200 + matrix.begin(); // Initialize the LED matrix } +// Define an array to hold pixel data for a single frame (4 pixels) uint32_t frame[] = { 0, 0, 0, 0xFFFF }; void loop() { + // Check if there are at least 12 bytes available in the serial buffer if(Serial.available() >= 12){ + // Read 4 bytes from the serial buffer and compose them into a 32-bit value for each element in the frame frame[0] = Serial.read() | Serial.read() << 8 | Serial.read() << 16 | Serial.read() << 24; frame[1] = Serial.read() | Serial.read() << 8 | Serial.read() << 16 | Serial.read() << 24; frame[2] = Serial.read() | Serial.read() << 8 | Serial.read() << 16 | Serial.read() << 24; + + // Load and display the received frame data on the LED matrix matrix.loadFrame(frame); } -} - +} \ No newline at end of file diff --git a/libraries/Arduino_LED_Matrix/examples/MatrixFrameBuffer/MatrixFrameBuffer.ino b/libraries/Arduino_LED_Matrix/examples/MatrixFrameBuffer/MatrixFrameBuffer.ino index 5e2a64861..c4633e998 100644 --- a/libraries/Arduino_LED_Matrix/examples/MatrixFrameBuffer/MatrixFrameBuffer.ino +++ b/libraries/Arduino_LED_Matrix/examples/MatrixFrameBuffer/MatrixFrameBuffer.ino @@ -1,6 +1,21 @@ +/* +Matrix Frame Buffer + +This Arduino sketch demonstrates the creation and manipulation of +a frame buffer for the LED matrix. The frame buffer is used to control +the lighting of individual LEDs on the matrix, turning them randomly on and off. + +See the full documentation here: +https://docs.arduino.cc/tutorials/uno-r4-wifi/led-matrix +*/ + +// Include the Arduino_LED_Matrix library #include "Arduino_LED_Matrix.h" + +// Creating an instance of the ArduinoLEDMatrix class ArduinoLEDMatrix matrix; +// Defining the frame array for the LED matrix with pixel values uint8_t frame[8][12] = { { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 }, { 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0 }, @@ -12,6 +27,7 @@ uint8_t frame[8][12] = { { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 } }; +// Setting up time intervals and dimensions for the matrix unsigned long lastTickTime, lastGameTickTime; #define UPDATE_INTERVAL 100 #define GAME_UPDATE_INTERVAL 66 @@ -19,19 +35,28 @@ unsigned long lastTickTime, lastGameTickTime; #define ROWS 8 #define COLUMNS 12 +// Variables to track the current positions uint8_t pointX = 0, pointY = 0; void setup() { - // put your setup code here, to run once: + // Initializing serial communication and delaying for setup Serial.begin(115200); delay(1500); + + // Initializing the LED matrix matrix.begin(); + + // Initializing time tracking variables lastGameTickTime = lastTickTime = millis(); } void loop() { + // Tracking the current time unsigned long msNow = millis(); + + // Updating the game logic with a fixed interval if (msNow - lastGameTickTime > GAME_UPDATE_INTERVAL) { + // Incrementing pointX and handling wraparound pointX++; if (pointX >= COLUMNS) { pointX = 0; @@ -40,14 +65,24 @@ void loop() { pointY = 0; } } + + // Generating random positions and pixel value pointX = random(COLUMNS); pointY = random(ROWS); uint8_t pixelValue = random(2); + + // Updating the frame with the new pixel value frame[pointY][pointX] = pixelValue; + + // Updating the last game tick time lastGameTickTime = msNow; } + + // Rendering the LED matrix with the current frame at a fixed interval if (msNow - lastTickTime > UPDATE_INTERVAL) { matrix.renderBitmap(frame, 8, 12); + + // Updating the last rendering tick time lastTickTime = msNow; } } \ No newline at end of file diff --git a/libraries/Arduino_LED_Matrix/examples/PlayAnimation/PlayAnimation.ino b/libraries/Arduino_LED_Matrix/examples/PlayAnimation/PlayAnimation.ino index bb53f02fc..ccce73a1b 100644 --- a/libraries/Arduino_LED_Matrix/examples/PlayAnimation/PlayAnimation.ino +++ b/libraries/Arduino_LED_Matrix/examples/PlayAnimation/PlayAnimation.ino @@ -1,7 +1,14 @@ +/* +Sketch shows animation defined in animation.h +*/ + +//Include library and animation.h + #include "Arduino_LED_Matrix.h" #include "animation.h" -ArduinoLEDMatrix matrix; +// Create an instance of the ArduinoLEDMatrix class +ArduinoLEDMatrix matrix; void setup() { Serial.begin(115200); From 88bf01ed3e55e6c1030094a452de50c0feb3e2c0 Mon Sep 17 00:00:00 2001 From: Hannes Siebeneicher Date: Tue, 22 Aug 2023 17:05:45 +0200 Subject: [PATCH 2/3] Apply Per's feedback and add more comments --- .../DACEqualTemperedScale.ino | 3 ++ .../examples/DACJacques/DACJacques.ino | 5 +- .../AnalogWave/examples/SineWave/SineWave.ino | 2 +- .../Arduino_CAN/examples/CANRead/CANRead.ino | 9 ++++ .../examples/CANWrite/CANWrite.ino | 9 ++++ .../FreeRTOS-Blink/FreeRTOS-Blink.ino | 8 +++ .../DisplaySingleFrame/DisplaySingleFrame.ino | 24 ++++----- .../examples/GameOfLife/GameOfLife.ino | 2 +- .../examples/LivePreview/LivePreview.ino | 4 +- .../MatrixFrameBuffer/MatrixFrameBuffer.ino | 52 +++++++++---------- .../examples/MatrixIntro/MatrixIntro.ino | 3 ++ .../examples/PlayAnimation/PlayAnimation.ino | 13 +++-- .../examples/eeprom_read/eeprom_read.ino | 14 +++-- .../examples/eeprom_write/eeprom_write.ino | 14 +++-- .../RTC/examples/RTC_Alarm/RTC_Alarm.ino | 6 +++ .../RTC_AutomaticExample.ino | 5 ++ .../RTC/examples/RTC_NTPSync/RTC_NTPSync.ino | 6 +++ .../RTC_PeriodicExample.ino | 5 ++ libraries/RTC/examples/Test_RTC/Test_RTC.ino | 36 ++++++++++++- .../AP_SimpleWebServer/AP_SimpleWebServer.ino | 3 ++ .../ConnectWithWPA/ConnectWithWPA.ino | 19 ++++--- .../examples/ScanNetworks/ScanNetworks.ino | 27 +++++----- .../ScanNetworksAdvanced.ino | 3 ++ .../SimpleWebServerWiFi.ino | 31 ++++++----- .../WiFiChatServer/WiFiChatServer.ino | 36 +++++++------ .../WiFiUdpNtpClient/WiFiUdpNtpClient.ino | 26 +++++----- .../WiFiUdpSendReceiveString.ino | 10 ++-- .../examples/WiFiWebClient/WiFiWebClient.ino | 23 ++++---- .../WiFiWebClientRepeating.ino | 4 +- .../WiFiWebClientSSL/WiFiWebClientSSL.ino | 2 + .../examples/WiFiWebServer/WiFiWebServer.ino | 3 ++ 31 files changed, 270 insertions(+), 137 deletions(-) diff --git a/libraries/AnalogWave/examples/DACEqualTemperedScale/DACEqualTemperedScale.ino b/libraries/AnalogWave/examples/DACEqualTemperedScale/DACEqualTemperedScale.ino index 7f3383f91..0686c5859 100644 --- a/libraries/AnalogWave/examples/DACEqualTemperedScale/DACEqualTemperedScale.ino +++ b/libraries/AnalogWave/examples/DACEqualTemperedScale/DACEqualTemperedScale.ino @@ -21,6 +21,9 @@ created 18 Dec 2018 modified 3 Jul 2023 by Tom Igoe + + See the full documentation here: + https://docs.arduino.cc/tutorials/uno-r4-wifi/dac */ // include the AnalogWave library: diff --git a/libraries/AnalogWave/examples/DACJacques/DACJacques.ino b/libraries/AnalogWave/examples/DACJacques/DACJacques.ino index c533e6dc0..c636aa2cd 100644 --- a/libraries/AnalogWave/examples/DACJacques/DACJacques.ino +++ b/libraries/AnalogWave/examples/DACJacques/DACJacques.ino @@ -1,4 +1,4 @@ - /* +/* DAC Melody player Generates a series of tones from MIDI note values @@ -14,6 +14,9 @@ circuit: created 13 Feb 2017 modified 3 Jul 2023 by Tom Igoe + + See the full documentation here: + https://docs.arduino.cc/tutorials/uno-r4-wifi/dac */ #include "analogWave.h" analogWave wave(DAC); diff --git a/libraries/AnalogWave/examples/SineWave/SineWave.ino b/libraries/AnalogWave/examples/SineWave/SineWave.ino index 5ec5eff6e..f29ccd993 100644 --- a/libraries/AnalogWave/examples/SineWave/SineWave.ino +++ b/libraries/AnalogWave/examples/SineWave/SineWave.ino @@ -3,7 +3,7 @@ Generates a pre-generated sawtooth-waveform. - See the full documentatio here: + See the full documentation here: https://docs.arduino.cc/tutorials/uno-r4-wifi/dac */ diff --git a/libraries/Arduino_CAN/examples/CANRead/CANRead.ino b/libraries/Arduino_CAN/examples/CANRead/CANRead.ino index 9b2e34a77..819ed6183 100644 --- a/libraries/Arduino_CAN/examples/CANRead/CANRead.ino +++ b/libraries/Arduino_CAN/examples/CANRead/CANRead.ino @@ -1,3 +1,12 @@ +/* + CANRead + + Receive and read CAN Bus messages + + See the full documentation here: + https://docs.arduino.cc/tutorials/uno-r4-wifi/can +*/ + /************************************************************************************** * INCLUDE **************************************************************************************/ diff --git a/libraries/Arduino_CAN/examples/CANWrite/CANWrite.ino b/libraries/Arduino_CAN/examples/CANWrite/CANWrite.ino index 2482e2c42..4114c249d 100644 --- a/libraries/Arduino_CAN/examples/CANWrite/CANWrite.ino +++ b/libraries/Arduino_CAN/examples/CANWrite/CANWrite.ino @@ -1,3 +1,12 @@ +/* + CANWrite + + Write and send CAN Bus messages + + See the full documentation here: + https://docs.arduino.cc/tutorials/uno-r4-wifi/can +*/ + /************************************************************************************** * INCLUDE **************************************************************************************/ diff --git a/libraries/Arduino_FreeRTOS/examples/FreeRTOS-Blink/FreeRTOS-Blink.ino b/libraries/Arduino_FreeRTOS/examples/FreeRTOS-Blink/FreeRTOS-Blink.ino index 8bba14cc8..039a67d7c 100644 --- a/libraries/Arduino_FreeRTOS/examples/FreeRTOS-Blink/FreeRTOS-Blink.ino +++ b/libraries/Arduino_FreeRTOS/examples/FreeRTOS-Blink/FreeRTOS-Blink.ino @@ -1,3 +1,11 @@ +/* + The code demonstrates the usage of FreeRTOS (Real-Time Operating System) to run concurrent tasks. + + One task is responsible for running the loop() logic (in a thread-safe manner), + while the other task blinks an LED using the built-in LED on non-Portenta boards or + the RGB LED on the Portenta C33 board. +*/ + /************************************************************************************** * INCLUDE **************************************************************************************/ diff --git a/libraries/Arduino_LED_Matrix/examples/DisplaySingleFrame/DisplaySingleFrame.ino b/libraries/Arduino_LED_Matrix/examples/DisplaySingleFrame/DisplaySingleFrame.ino index aed801431..24a368143 100644 --- a/libraries/Arduino_LED_Matrix/examples/DisplaySingleFrame/DisplaySingleFrame.ino +++ b/libraries/Arduino_LED_Matrix/examples/DisplaySingleFrame/DisplaySingleFrame.ino @@ -1,13 +1,13 @@ /* -Single Frame - -Displays single frames using matrix.loadFrame - -See the full documentation here: -https://docs.arduino.cc/tutorials/uno-r4-wifi/led-matrix + Single Frame + + Displays single frames using matrix.loadFrame + + See the full documentation here: + https://docs.arduino.cc/tutorials/uno-r4-wifi/led-matrix */ -#include "Arduino_LED_Matrix.h" // Include the library for controlling LED matrix +#include "Arduino_LED_Matrix.h" // Include the LED_Matrix library #include "frames.h" // Include a header file containing frame data ArduinoLEDMatrix matrix; // Create an instance of the ArduinoLEDMatrix class @@ -15,24 +15,24 @@ ArduinoLEDMatrix matrix; // Create an instance of the ArduinoLEDMatrix void setup() { Serial.begin(115200); // Initialize serial communication at a baud rate of 115200 matrix.begin(); // Initialize the LED matrix -} +} void loop() { // Load and display the "chip" frame on the LED matrix matrix.loadFrame(chip); delay(500); // Pause for 500 milliseconds (half a second) - // Load and display the "happy" frame on the LED matrix + // Load and display the "danger" frame on the LED matrix matrix.loadFrame(danger); - delay(500); // Pause for 500 milliseconds (half a second) + delay(500); // Load and display the "happy" frame on the LED matrix matrix.loadFrame(happy); - delay(500); // Pause for 500 milliseconds (half a second) + delay(500); // Load and display the "heart" frame on the LED matrix matrix.loadFrame(heart); - delay(500); // Pause for 500 milliseconds (half a second) + delay(500); // Print the current value of millis() to the serial monitor Serial.println(millis()); diff --git a/libraries/Arduino_LED_Matrix/examples/GameOfLife/GameOfLife.ino b/libraries/Arduino_LED_Matrix/examples/GameOfLife/GameOfLife.ino index 5c939439d..00f1e58bc 100644 --- a/libraries/Arduino_LED_Matrix/examples/GameOfLife/GameOfLife.ino +++ b/libraries/Arduino_LED_Matrix/examples/GameOfLife/GameOfLife.ino @@ -13,7 +13,7 @@ https://docs.arduino.cc/tutorials/uno-r4-wifi/led-matrix */ -#include "Arduino_LED_Matrix.h" +#include "Arduino_LED_Matrix.h" // Include the LED_Matrix library // grid dimensions. should not be larger than 8x8 #define MAX_Y 8 diff --git a/libraries/Arduino_LED_Matrix/examples/LivePreview/LivePreview.ino b/libraries/Arduino_LED_Matrix/examples/LivePreview/LivePreview.ino index 160de4dd2..3aeb3d697 100644 --- a/libraries/Arduino_LED_Matrix/examples/LivePreview/LivePreview.ino +++ b/libraries/Arduino_LED_Matrix/examples/LivePreview/LivePreview.ino @@ -10,7 +10,7 @@ https://docs.arduino.cc/tutorials/uno-r4-wifi/led-matrix */ -#include "Arduino_LED_Matrix.h" // Include the library for controlling LED matrix +#include "Arduino_LED_Matrix.h" // Include the LED_Matrix library ArduinoLEDMatrix matrix; // Create an instance of the ArduinoLEDMatrix class @@ -35,4 +35,4 @@ void loop() { // Load and display the received frame data on the LED matrix matrix.loadFrame(frame); } -} \ No newline at end of file +} diff --git a/libraries/Arduino_LED_Matrix/examples/MatrixFrameBuffer/MatrixFrameBuffer.ino b/libraries/Arduino_LED_Matrix/examples/MatrixFrameBuffer/MatrixFrameBuffer.ino index c4633e998..db86656f8 100644 --- a/libraries/Arduino_LED_Matrix/examples/MatrixFrameBuffer/MatrixFrameBuffer.ino +++ b/libraries/Arduino_LED_Matrix/examples/MatrixFrameBuffer/MatrixFrameBuffer.ino @@ -1,23 +1,23 @@ /* -Matrix Frame Buffer - -This Arduino sketch demonstrates the creation and manipulation of -a frame buffer for the LED matrix. The frame buffer is used to control -the lighting of individual LEDs on the matrix, turning them randomly on and off. - -See the full documentation here: -https://docs.arduino.cc/tutorials/uno-r4-wifi/led-matrix + Matrix Frame Buffer + + This Arduino sketch demonstrates the creation and manipulation of + a frame buffer for the LED matrix. The frame buffer is used to control + the lighting of individual LEDs on the matrix, turning them randomly on and off. + + See the full documentation here: + https://docs.arduino.cc/tutorials/uno-r4-wifi/led-matrix */ -// Include the Arduino_LED_Matrix library -#include "Arduino_LED_Matrix.h" +// Include the LED_Matrix library +#include "Arduino_LED_Matrix.h" -// Creating an instance of the ArduinoLEDMatrix class -ArduinoLEDMatrix matrix; +// Create an instance of the ArduinoLEDMatrix class +ArduinoLEDMatrix matrix; -// Defining the frame array for the LED matrix with pixel values +// Define the frame array for the LED matrix with pixel values uint8_t frame[8][12] = { - { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 }, + { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 }, { 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0 }, @@ -27,7 +27,7 @@ uint8_t frame[8][12] = { { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 } }; -// Setting up time intervals and dimensions for the matrix +// Set up time intervals and dimensions for the matrix unsigned long lastTickTime, lastGameTickTime; #define UPDATE_INTERVAL 100 #define GAME_UPDATE_INTERVAL 66 @@ -39,24 +39,24 @@ unsigned long lastTickTime, lastGameTickTime; uint8_t pointX = 0, pointY = 0; void setup() { - // Initializing serial communication and delaying for setup + // Initialize serial communication and delaying for setup Serial.begin(115200); delay(1500); - // Initializing the LED matrix + // Initialize the LED matrix matrix.begin(); - // Initializing time tracking variables + // Initialize time tracking variables lastGameTickTime = lastTickTime = millis(); } void loop() { - // Tracking the current time + // Track the current time unsigned long msNow = millis(); - // Updating the game logic with a fixed interval + // Update the game logic with a fixed interval if (msNow - lastGameTickTime > GAME_UPDATE_INTERVAL) { - // Incrementing pointX and handling wraparound + // Increment pointX and handling wraparound pointX++; if (pointX >= COLUMNS) { pointX = 0; @@ -66,23 +66,23 @@ void loop() { } } - // Generating random positions and pixel value + // Generate random positions and pixel value pointX = random(COLUMNS); pointY = random(ROWS); uint8_t pixelValue = random(2); - // Updating the frame with the new pixel value + // Update the frame with the new pixel value frame[pointY][pointX] = pixelValue; - // Updating the last game tick time + // Update the last game tick time lastGameTickTime = msNow; } - // Rendering the LED matrix with the current frame at a fixed interval + // Render the LED matrix with the current frame at a fixed interval if (msNow - lastTickTime > UPDATE_INTERVAL) { matrix.renderBitmap(frame, 8, 12); - // Updating the last rendering tick time + // Update the last rendering tick time lastTickTime = msNow; } } \ No newline at end of file diff --git a/libraries/Arduino_LED_Matrix/examples/MatrixIntro/MatrixIntro.ino b/libraries/Arduino_LED_Matrix/examples/MatrixIntro/MatrixIntro.ino index ea284dc35..d7e898fa8 100644 --- a/libraries/Arduino_LED_Matrix/examples/MatrixIntro/MatrixIntro.ino +++ b/libraries/Arduino_LED_Matrix/examples/MatrixIntro/MatrixIntro.ino @@ -11,6 +11,9 @@ created 26 Jun 2023 by Martino Facchin + + See the full documentation here: + https://docs.arduino.cc/tutorials/uno-r4-wifi/led-matrix */ diff --git a/libraries/Arduino_LED_Matrix/examples/PlayAnimation/PlayAnimation.ino b/libraries/Arduino_LED_Matrix/examples/PlayAnimation/PlayAnimation.ino index ccce73a1b..534d17077 100644 --- a/libraries/Arduino_LED_Matrix/examples/PlayAnimation/PlayAnimation.ino +++ b/libraries/Arduino_LED_Matrix/examples/PlayAnimation/PlayAnimation.ino @@ -1,11 +1,16 @@ /* -Sketch shows animation defined in animation.h + Play Animation + + Sketch shows animation defined in animation.h + + See the full documentation here: + https://docs.arduino.cc/tutorials/uno-r4-wifi/led-matrix */ -//Include library and animation.h -#include "Arduino_LED_Matrix.h" -#include "animation.h" + +#include "Arduino_LED_Matrix.h" //Include the LED_Matrix library +#include "animation.h" //Include animation.h header file // Create an instance of the ArduinoLEDMatrix class ArduinoLEDMatrix matrix; diff --git a/libraries/EEPROM/examples/eeprom_read/eeprom_read.ino b/libraries/EEPROM/examples/eeprom_read/eeprom_read.ino index d4650358d..1302edfdb 100644 --- a/libraries/EEPROM/examples/eeprom_read/eeprom_read.ino +++ b/libraries/EEPROM/examples/eeprom_read/eeprom_read.ino @@ -1,11 +1,15 @@ /* - * EEPROM Read - * - * Reads the value of each byte of the EEPROM and prints it - * to the computer. - * This example code is in the public domain. + EEPROM Read + + Reads the value of each byte of the EEPROM and prints it + to the computer. + This example code is in the public domain. + + See the full documentation here: + https://docs.arduino.cc/tutorials/uno-r4-wifi/eeprom */ +// Include the EEPROM library #include // start reading from the first byte (address 0) of the EEPROM diff --git a/libraries/EEPROM/examples/eeprom_write/eeprom_write.ino b/libraries/EEPROM/examples/eeprom_write/eeprom_write.ino index 64e835cd6..d2cf09200 100644 --- a/libraries/EEPROM/examples/eeprom_write/eeprom_write.ino +++ b/libraries/EEPROM/examples/eeprom_write/eeprom_write.ino @@ -1,11 +1,15 @@ /* - * EEPROM Write - * - * Stores values read from analog input 0 into the EEPROM. - * These values will stay in the EEPROM when the board is - * turned off and may be retrieved later by another sketch. + EEPROM Write + + Stores values read from analog input 0 into the EEPROM. + These values will stay in the EEPROM when the board is + turned off and may be retrieved later by another sketch. + + See the full documentation here: + https://docs.arduino.cc/tutorials/uno-r4-wifi/eeprom */ +// Include the EEPROM library #include /** the current address in the EEPROM (i.e. which byte we're going to write to next) **/ diff --git a/libraries/RTC/examples/RTC_Alarm/RTC_Alarm.ino b/libraries/RTC/examples/RTC_Alarm/RTC_Alarm.ino index 03ebc05df..db47ea100 100644 --- a/libraries/RTC/examples/RTC_Alarm/RTC_Alarm.ino +++ b/libraries/RTC/examples/RTC_Alarm/RTC_Alarm.ino @@ -1,4 +1,6 @@ /* + * RTC_Alarm + * * This example demonstrates how to use the alarm functionality of the RTC * (Real Time Clock) on the Portenta C33 and UNO R4 Minima / WiFi. * @@ -9,12 +11,16 @@ * * Note that the Portenta C33's LED is inverted and will be lit when * the state is 0 (LOW). + * + * Find the full UNO R4 WiFi RTC documentation here: + * https://docs.arduino.cc/tutorials/uno-r4-wifi/rtc */ unsigned long previousMillis = 0; const long interval = 1000; bool ledState = false; +// Include the RTC library #include "RTC.h" void setup() { diff --git a/libraries/RTC/examples/RTC_AutomaticExample/RTC_AutomaticExample.ino b/libraries/RTC/examples/RTC_AutomaticExample/RTC_AutomaticExample.ino index 0b87b0b5e..cca5063d6 100644 --- a/libraries/RTC/examples/RTC_AutomaticExample/RTC_AutomaticExample.ino +++ b/libraries/RTC/examples/RTC_AutomaticExample/RTC_AutomaticExample.ino @@ -1,4 +1,6 @@ /* + * RTC_AutomaticExample + * * This example sets the RTC (Real Time Clock) on the Portenta C33 automatically by * retrieving the date and time from the computer you upload the sketch from, at the * point when you start the upload. @@ -8,8 +10,11 @@ * The alarm, which now goes off once a minute, triggers a callback that prints the * current time to the Serial Monitor. * + * Find the full UNO R4 WiFi RTC documentation here: + * https://docs.arduino.cc/tutorials/uno-r4-wifi/rtc */ +// Include the RTC library #include "RTC.h" DayOfWeek convertDayOfWeek(String s) diff --git a/libraries/RTC/examples/RTC_NTPSync/RTC_NTPSync.ino b/libraries/RTC/examples/RTC_NTPSync/RTC_NTPSync.ino index 3b7e4d77b..6b200a563 100644 --- a/libraries/RTC/examples/RTC_NTPSync/RTC_NTPSync.ino +++ b/libraries/RTC/examples/RTC_NTPSync/RTC_NTPSync.ino @@ -10,9 +10,15 @@ * 4. Open the Serial Monitor. * * Initial author: Sebastian Romero @sebromero + * + * Find the full UNO R4 WiFi RTC documentation here: + * https://docs.arduino.cc/tutorials/uno-r4-wifi/rtc */ +// Include the RTC library #include "RTC.h" + +//Include the NTP library #include #if defined(ARDUINO_PORTENTA_C33) diff --git a/libraries/RTC/examples/RTC_PeriodicExample/RTC_PeriodicExample.ino b/libraries/RTC/examples/RTC_PeriodicExample/RTC_PeriodicExample.ino index 4f467f7d1..fa1820acc 100644 --- a/libraries/RTC/examples/RTC_PeriodicExample/RTC_PeriodicExample.ino +++ b/libraries/RTC/examples/RTC_PeriodicExample/RTC_PeriodicExample.ino @@ -1,11 +1,16 @@ /* + * RTC_PeriodicExample + * * This example demonstrates how to use the periodic callback functionality of the RTC * (Real Time Clock) on the Portenta C33. * * It blinks the built-in LED at progressively faster and slower rates repeatedly. * + * Find the full UNO R4 WiFi RTC documentation here: + * https://docs.arduino.cc/tutorials/uno-r4-wifi/rtc */ +// Include the RTC library #include "RTC.h" #define BLINK_DELAY 2000 diff --git a/libraries/RTC/examples/Test_RTC/Test_RTC.ino b/libraries/RTC/examples/Test_RTC/Test_RTC.ino index 6eb87aff5..67dd08cf2 100644 --- a/libraries/RTC/examples/Test_RTC/Test_RTC.ino +++ b/libraries/RTC/examples/Test_RTC/Test_RTC.ino @@ -1,17 +1,34 @@ +/* + Test RTC + + A test sketch showcasing all RTC showcasing various functionalities related to the RTC module, + including setting the time, handling interrupts, and reading time values. + + Find the full UNO R4 WiFi RTC documentation here: + https://docs.arduino.cc/tutorials/uno-r4-wifi/rtc +*/ + +// Include the RTC library #include "RTC.h" +// Define the interrupt pin for LED control during interrupts const int LED_ON_INTERRUPT = 22; +// Callback function for periodic interrupt void periodic_cbk() { static bool clb_st = false; + + // Toggle the LED based on callback state if(clb_st) { digitalWrite(LED_ON_INTERRUPT,HIGH); } else { digitalWrite(LED_ON_INTERRUPT,LOW); } - clb_st = !clb_st; + + clb_st = !clb_st; // Toggle callback state + // Print message indicating periodic interrupt Serial.println("PERIODIC INTERRUPT"); } @@ -19,32 +36,44 @@ void alarm_cbk() { Serial.println("ALARM INTERRUPT"); } +// Callback function for alarm interrupt void setup() { + // Initialize serial communication Serial.begin(9600); + // Wait for serial connection while(!Serial) { } + // Set LED pins as outputs pinMode(LED_BUILTIN, OUTPUT); pinMode(LED_ON_INTERRUPT, OUTPUT); + // Initialize the RTC RTC.begin(); + + // Set a specific initial time (August 25, 2022, 14:37:00 Thursday) RTCTime mytime(25, Month::AUGUST, 2022, 14, 37, 00, DayOfWeek::THURSDAY, SaveLight::SAVING_TIME_ACTIVE); + // Set the initial time if RTC is not running if(!RTC.isRunning()) { RTC.setTime(mytime); } + // Create an alarm time set to 35 seconds RTCTime alarmtime; alarmtime.setSecond(35); + // Create an AlarmMatch object to match seconds AlarmMatch am; am.addMatchSecond(); + // Set the periodic callback function to run once every 2 seconds if(!RTC.setPeriodicCallback(periodic_cbk, Period::ONCE_EVERY_2_SEC)) { Serial.println("ERROR: periodic callback not set"); } + // Set the alarm callback function with the alarm time and matching condition if(!RTC.setAlarmCallback(alarm_cbk, alarmtime, am)) { Serial.println("ERROR: alarm callback not set"); } @@ -55,8 +84,11 @@ void loop() { static bool status = false; RTCTime currenttime; + + // Check if RTC is running and print status if(status) { - + + // Toggle LED and display RTC status if 'status' is true if(RTC.isRunning()) { Serial.println("RTC is running"); } diff --git a/libraries/WiFiS3/examples/AP_SimpleWebServer/AP_SimpleWebServer.ino b/libraries/WiFiS3/examples/AP_SimpleWebServer/AP_SimpleWebServer.ino index bc2e69083..cedf85c61 100644 --- a/libraries/WiFiS3/examples/AP_SimpleWebServer/AP_SimpleWebServer.ino +++ b/libraries/WiFiS3/examples/AP_SimpleWebServer/AP_SimpleWebServer.ino @@ -14,6 +14,9 @@ created 25 Nov 2012 by Tom Igoe adapted to WiFi AP by Adafruit + + Find the full UNO R4 WiFi RTC documentation here: + https://docs.arduino.cc/tutorials/uno-r4-wifi/wifi-examples#access-point */ #include "WiFiS3.h" diff --git a/libraries/WiFiS3/examples/ConnectWithWPA/ConnectWithWPA.ino b/libraries/WiFiS3/examples/ConnectWithWPA/ConnectWithWPA.ino index ccf1199b8..4f3d07271 100644 --- a/libraries/WiFiS3/examples/ConnectWithWPA/ConnectWithWPA.ino +++ b/libraries/WiFiS3/examples/ConnectWithWPA/ConnectWithWPA.ino @@ -1,12 +1,15 @@ /* - 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 - by dlf (Metodo2 srl) - modified 31 May 2012 - by Tom Igoe + 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 + by dlf (Metodo2 srl) + modified 31 May 2012 + by Tom Igoe + + Find the full UNO R4 WiFi RTC documentation here: + https://docs.arduino.cc/tutorials/uno-r4-wifi/wifi-examples#connect-with-wpa */ #include diff --git a/libraries/WiFiS3/examples/ScanNetworks/ScanNetworks.ino b/libraries/WiFiS3/examples/ScanNetworks/ScanNetworks.ino index 0f5e40ad1..a275f71d8 100644 --- a/libraries/WiFiS3/examples/ScanNetworks/ScanNetworks.ino +++ b/libraries/WiFiS3/examples/ScanNetworks/ScanNetworks.ino @@ -1,16 +1,19 @@ /* - 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 - connect to any network, so no encryption scheme is specified. - - Circuit: - * Board with NINA module (Arduino MKR WiFi 1010, MKR VIDOR 4000 and Uno WiFi Rev.2) - - created 13 July 2010 - by dlf (Metodo2 srl) - modified 21 Junn 2012 - by Tom Igoe and Jaymes Dec + 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 + connect to any network, so no encryption scheme is specified. + + Circuit: + * Board with NINA module (Arduino MKR WiFi 1010, MKR VIDOR 4000 and Uno WiFi Rev.2) + + created 13 July 2010 + by dlf (Metodo2 srl) + modified 21 Junn 2012 + by Tom Igoe and Jaymes Dec + + Find the full UNO R4 WiFi RTC documentation here: + https://docs.arduino.cc/tutorials/uno-r4-wifi/wifi-examples#scan-networks */ diff --git a/libraries/WiFiS3/examples/ScanNetworksAdvanced/ScanNetworksAdvanced.ino b/libraries/WiFiS3/examples/ScanNetworksAdvanced/ScanNetworksAdvanced.ino index d18d65e92..63619cc03 100644 --- a/libraries/WiFiS3/examples/ScanNetworksAdvanced/ScanNetworksAdvanced.ino +++ b/libraries/WiFiS3/examples/ScanNetworksAdvanced/ScanNetworksAdvanced.ino @@ -12,6 +12,9 @@ created 1 Mar 2017 by Arturo Guadalupi + + Find the full UNO R4 WiFi RTC documentation here: + https://docs.arduino.cc/tutorials/uno-r4-wifi/wifi-examples#scan-networks-advanced */ diff --git a/libraries/WiFiS3/examples/SimpleWebServerWiFi/SimpleWebServerWiFi.ino b/libraries/WiFiS3/examples/SimpleWebServerWiFi/SimpleWebServerWiFi.ino index 786bbdaf3..9746cea93 100644 --- a/libraries/WiFiS3/examples/SimpleWebServerWiFi/SimpleWebServerWiFi.ino +++ b/libraries/WiFiS3/examples/SimpleWebServerWiFi/SimpleWebServerWiFi.ino @@ -1,24 +1,27 @@ /* 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. + 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 + 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. + This example is written for a network using WPA encryption. For + 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) - * LED attached to pin 9 + Circuit: + * Board with NINA module (Arduino MKR WiFi 1010, MKR VIDOR 4000 and Uno WiFi Rev.2) + * LED attached to pin 9 - created 25 Nov 2012 - by Tom Igoe + created 25 Nov 2012 + by Tom Igoe + + Find the full UNO R4 WiFi RTC documentation here: + https://docs.arduino.cc/tutorials/uno-r4-wifi/wifi-examples#simple-webserver */ #include "WiFiS3.h" diff --git a/libraries/WiFiS3/examples/WiFiChatServer/WiFiChatServer.ino b/libraries/WiFiS3/examples/WiFiChatServer/WiFiChatServer.ino index 9da123c65..e7fa456c1 100644 --- a/libraries/WiFiS3/examples/WiFiChatServer/WiFiChatServer.ino +++ b/libraries/WiFiS3/examples/WiFiChatServer/WiFiChatServer.ino @@ -1,22 +1,24 @@ /* - 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: - * Board with NINA module (Arduino MKR WiFi 1010, MKR VIDOR 4000 and Uno WiFi Rev.2) - - created 18 Dec 2009 - by David A. Mellis - modified 31 May 2012 - by Tom Igoe + 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: + * Board with NINA module (Arduino MKR WiFi 1010, MKR VIDOR 4000 and Uno WiFi Rev.2) + + created 18 Dec 2009 + by David A. Mellis + modified 31 May 2012 + by Tom Igoe + Find the full UNO R4 WiFi RTC documentation here: + https://docs.arduino.cc/tutorials/uno-r4-wifi/wifi-examples#wi-fi-chat-server */ diff --git a/libraries/WiFiS3/examples/WiFiUdpNtpClient/WiFiUdpNtpClient.ino b/libraries/WiFiS3/examples/WiFiUdpNtpClient/WiFiUdpNtpClient.ino index 585c54ad7..3f58e89ff 100644 --- a/libraries/WiFiS3/examples/WiFiUdpNtpClient/WiFiUdpNtpClient.ino +++ b/libraries/WiFiS3/examples/WiFiUdpNtpClient/WiFiUdpNtpClient.ino @@ -1,20 +1,22 @@ /* - Udp NTP Client + Udp NTP Client - Get the time from a Network Time Protocol (NTP) time server - Demonstrates use of UDP sendPacket and ReceivePacket - For more on NTP time servers and the messages needed to communicate with them, - see http://en.wikipedia.org/wiki/Network_Time_Protocol + Get the time from a Network Time Protocol (NTP) time server + Demonstrates use of UDP sendPacket and ReceivePacket + For more on NTP time servers and the messages needed to communicate with them, + see http://en.wikipedia.org/wiki/Network_Time_Protocol - created 4 Sep 2010 - by Michael Margolis - modified 9 Apr 2012 - by Tom Igoe - modified May, 4th 2023 - by Daniele Aimo + created 4 Sep 2010 + by Michael Margolis + modified 9 Apr 2012 + by Tom Igoe + modified May, 4th 2023 + by Daniele Aimo - This code is in the public domain. + This code is in the public domain. + Find the full UNO R4 WiFi RTC documentation here: + https://docs.arduino.cc/tutorials/uno-r4-wifi/wifi-examples#wi-fi-udp-ntp-client */ diff --git a/libraries/WiFiS3/examples/WiFiUdpSendReceiveString/WiFiUdpSendReceiveString.ino b/libraries/WiFiS3/examples/WiFiUdpSendReceiveString/WiFiUdpSendReceiveString.ino index 0ced9ab2e..709aae49b 100644 --- a/libraries/WiFiS3/examples/WiFiUdpSendReceiveString/WiFiUdpSendReceiveString.ino +++ b/libraries/WiFiS3/examples/WiFiUdpSendReceiveString/WiFiUdpSendReceiveString.ino @@ -1,12 +1,14 @@ /* WiFi UDP Send and Receive String - This sketch waits for a UDP packet on localPort using the WiFi module. - When a packet is received an Acknowledge packet is sent to the client on port remotePort + This sketch waits for a UDP packet on localPort using the WiFi module. + When a packet is received an Acknowledge packet is sent to the client on port remotePort - created 30 December 2012 - by dlf (Metodo2 srl) + created 30 December 2012 + by dlf (Metodo2 srl) + Find the full UNO R4 WiFi RTC documentation here: + https://docs.arduino.cc/tutorials/uno-r4-wifi/wifi-examples#wi-fi-udp-send-receive-string */ diff --git a/libraries/WiFiS3/examples/WiFiWebClient/WiFiWebClient.ino b/libraries/WiFiS3/examples/WiFiWebClient/WiFiWebClient.ino index 9b6169b33..c7de4a997 100644 --- a/libraries/WiFiS3/examples/WiFiWebClient/WiFiWebClient.ino +++ b/libraries/WiFiS3/examples/WiFiWebClient/WiFiWebClient.ino @@ -1,20 +1,23 @@ /* Web client - This sketch connects to a website (http://www.google.com) - using the WiFi module. + 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. - 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 + created 13 July 2010 + by dlf (Metodo2 srl) + modified 31 May 2012 + by Tom Igoe + + Find the full UNO R4 WiFi RTC documentation here: + https://docs.arduino.cc/tutorials/uno-r4-wifi/wifi-examples#wi-fi-web-client */ diff --git a/libraries/WiFiS3/examples/WiFiWebClientRepeating/WiFiWebClientRepeating.ino b/libraries/WiFiS3/examples/WiFiWebClientRepeating/WiFiWebClientRepeating.ino index 09ee4c28c..7df9def6a 100644 --- a/libraries/WiFiS3/examples/WiFiWebClientRepeating/WiFiWebClientRepeating.ino +++ b/libraries/WiFiS3/examples/WiFiWebClientRepeating/WiFiWebClientRepeating.ino @@ -10,8 +10,10 @@ modified 13 Jan 2014 by Federico Vanzati - http://www.arduino.cc/en/Tutorial/WifiWebClientRepeating This code is in the public domain. + + Find the full UNO R4 WiFi RTC documentation here: + https://docs.arduino.cc/tutorials/uno-r4-wifi/wifi-examples#wi-fi-web-client-repeating */ #include "WiFiS3.h" diff --git a/libraries/WiFiS3/examples/WiFiWebClientSSL/WiFiWebClientSSL.ino b/libraries/WiFiS3/examples/WiFiWebClientSSL/WiFiWebClientSSL.ino index 742666a32..1df9bccb8 100644 --- a/libraries/WiFiS3/examples/WiFiWebClientSSL/WiFiWebClientSSL.ino +++ b/libraries/WiFiS3/examples/WiFiWebClientSSL/WiFiWebClientSSL.ino @@ -4,6 +4,8 @@ Remeber to update the CA certificates using CertificateUploader sketch before using this sketch. + Find the full UNO R4 WiFi RTC documentation here: + https://docs.arduino.cc/tutorials/uno-r4-wifi/wifi-examples#wi-fi-web-client-ssl */ #include "WiFiS3.h" diff --git a/libraries/WiFiS3/examples/WiFiWebServer/WiFiWebServer.ino b/libraries/WiFiS3/examples/WiFiWebServer/WiFiWebServer.ino index 8ecf4130a..b34aefc2d 100644 --- a/libraries/WiFiS3/examples/WiFiWebServer/WiFiWebServer.ino +++ b/libraries/WiFiS3/examples/WiFiWebServer/WiFiWebServer.ino @@ -14,6 +14,9 @@ modified 31 May 2012 by Tom Igoe + + Find the full UNO R4 WiFi RTC documentation here: + https://docs.arduino.cc/tutorials/uno-r4-wifi/wifi-examples#wi-fi-web-server */ #include "WiFiS3.h" From 16515ba9d7f23fa3425c05d344cd9a50bbf7fc49 Mon Sep 17 00:00:00 2001 From: Hannes Siebeneicher Date: Tue, 22 Aug 2023 17:06:55 +0200 Subject: [PATCH 3/3] Add RTC_NTPSync name to comment --- libraries/RTC/examples/RTC_NTPSync/RTC_NTPSync.ino | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libraries/RTC/examples/RTC_NTPSync/RTC_NTPSync.ino b/libraries/RTC/examples/RTC_NTPSync/RTC_NTPSync.ino index 6b200a563..3a7117f27 100644 --- a/libraries/RTC/examples/RTC_NTPSync/RTC_NTPSync.ino +++ b/libraries/RTC/examples/RTC_NTPSync/RTC_NTPSync.ino @@ -1,4 +1,6 @@ /** + * RTC_NTPSync + * * This example shows how to set the RTC (Real Time Clock) on the Portenta C33 / UNO R4 WiFi * to the current date and time retrieved from an NTP server on the Internet (pool.ntp.org). * Then the current time from the RTC is printed to the Serial port.