03. NTP Client example - ArmDeveloperEcosystem/Corstone-for-Arduino GitHub Wiki

About

This example uses the Arduino Ethernet library's UdpNtpClient example to query a Network Time Protocol (NTP) server using UDP.

More details can be found on the Arduino "Ethernet Shield Network Time Protocol (NTP) Client" page.

Prerequisites

Guide

  1. SSH into the AVH EC2 instance.
  2. Change to example directory: cd ~/Arduino/libraries/Ethernet/examples/UdpNtpClient/
  3. Compile example: ~/bin/arduino-cli compile -b arm:corstone:corstone_300 -v
  4. Run example: ~/bin/arduino-cli upload -b arm:corstone:corstone_300 -v
  5. The FVP will connect to the virtual ethernet network.
  6. The example's main loop will send an NTP request to an NTP server and print the current epoch and NTP time.
  7. CTRL-C can be used to stop running.

Example Output

Ethernet-UdpNtpClient-Ouput