Close
0%
0%

Retrieve Universal Time (UTC)

We will parse the UTC packet to show current UTC time in the serial monitor.

Similar projects worth following
In this example, we connect Ameba to WiFi. Then send NTP (Network Time Protocol, RFC 1305) request to NTP server using UDP. After receiving the NTP request, the NTP server replies current UTC (Coordinated Universal Time) packet. We will parse the UTC packet to show current UTC time in the serial monitor.

Ameba RTL8722DM is a low-power dual-band WLAN and Bluetooth Low Energy SoC by Realtek. The RTL8722DM also include memory for Wi-Fi protocol functions and application making it simple for anyone to develop various kind of IoT applications. At the same time it has a wide range of peripheral interfaces. With all these interfaces, it can connect to most of the electronics components like LEDs, temperature and humidity sensors, and so on.

More Resources:

If you need additional technical documents or the source code for this project. Please visit the official websites and join the Facebook group and forum.

Edit details

  • 1 × RTL8722DM_MINI Microcontroller

  • 1
    Setup

    Open the example. “File” -> “Examples” -> “AmebaWiFi” -> “WiFiUdpNtpClient”

    Modify the highlighted code section (ssid, password, keyIndex) to connect to your WiFi network.

  • 2
    Final Result

    Compile the code and upload it to Ameba. After pressing the Reset button, Ameba connects to WiFi and sends NTP request packet to NTP server “129.6.15.28”. We parse the replied packet and show UTC time in serial monitor:

View all instructions

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates