Lesson 4 Seedling Stage: Getting Network Time
Challenges: 4-1, 4-2
Students learn to connect the UNIHIKER K10 to the Internet, obtain the local time, and display it on the screen.
I can program the UNIHIKER K10 to connect to the Internet.
I can explain what the meaning of the IP address is.
I can create a watering reminder model using the obtained local time.
Engage
2 min.
Plants need water at the right time to grow strong. If you wanted to build a device to remind you to water your plants every day at 9:00 AM, what would your device need to know?

Today, we'll program the UNIHIKER K10 to get the time from the Internet, just like your phone or computer does, and use it to build a smart watering reminder.
Background
3 min.
We can get the current from the internet using the Network Time Protocol (NTP).
What is the Protocol?A protocol is a set of rules that allows two or more devices to talk to each other. Wi-Fi is a protocol that defines how devices connect wirelessly, and NTP is the specific set of rules for asking a time server "What time is it?" and understanding the answer.


Wi-Fi connect block: This block tells the UNIHIKER which network to join.

NTP blocks set up a connection to a time server and tell it our time zone and obtain the specific data of time.

Speaker
The UNIHIKER K10 has a built-in speaker. We can program it to play sounds or melodies.

Build and Connect
5 min.
![]() | No new construction is required. Reuse structures from Lessons 1 & 2 and optionally connect with matching building blocks. |
Program
30 min.
Challenge 4-1: Connect to the Network
![]() | Ask students to do the preparation for programming. Provide students with the correct network name (SSID) and password. Encourage students to give the program a way to tell us the connection status. |
![]() | ![]() Guide students to optimize their program. Here is a sample: |
![]() | After uploading the program, guide students to discuss: Press button A. What does the string of numbers represent?Press it again. Does the IP address change? Is everyone's address the same? |
Introduce the key vocabulary: IP address.
Explain that the IP address is like your device's unique "mailing address" on the local network. It allows data to find its way to the correct device.
Challenge 4-2: Get and Use the Local Time
![]() | ![]() ![]() Ask students to load the starter project program4-2 and upload it. Challenge students to search for the current timezone and modify the timezone in the program to get and display their local time. Here is a method to check the current time and time zone around the worldFrom the link: https://checktimezone.com/HINT: the “+” and “-” symbols in the UTC Offset match the East and West in the program, respectively. |
![]() | ![]() Challenge students to program a reminder after 5 minutes. Here is a sample if the current time is 10:45:Give students several minutes to choose their favorite sound. |
Extra Practice
5 min.
How often does your watering reminder play a sound? Every day or every hour? How could you program a daily watering reminder at 9:00 AM? The required boolean block is shown below:

Next Class: Lesson 5
Current Tutorial: Click Here



















