Lesson2 CodeyRockyWeatherReporterPanda Advanced PDF
Lesson2 CodeyRockyWeatherReporterPanda Advanced PDF
When Codey starts up, it connects to a Wi-Fi network and starts accessing the
real-time maximum temperature of a specified city. Meanwhile, Codey sends
the temperature data to the sprite Panda. The sprite panda repeatedly checks
the temperature condition and makes decisions.
Device Sprite
Select a Wi-Fi network name and enter the password. If Codey is successfully
connected to the Wi-Fi, it will display the first image as shown in the picture,
otherwise it will display the second image.
the world
If Codey is successfully connected to a Wi-Fi network, it will repeatedly display the
maximum temperature of some major cities around the world, such as Beijing, Shanghai
and Tokyo.
Create a new variable named "Beijing". The variable will report the maximum
temperature of Beijing to the sprite Panda. If the highest temperature is beyond
25℃, Codey will display the word "hot" on its LED screen, otherwise it will show
"cool".
Step3 Put the following blocks together as shown. Define the variable and
check the temperature condition.
Set the variable “Beijing” to
maximum temperature in
Beijing" which is received
from the weather observatory
The sprite panda receives the variable sent by Codey and displays the
maximum temperature of Beijing in real time. Meanwhile, Codey checks the
temperature condition to decide what to display on its LED screen: when the
highest temperature is beyond 25℃, it will display "hot", otherwise it will display
"cool".
Step1 Select Sprites and click Variables. Drag the following blocks to the
Scripts area and join them together as shown.
The sprite panda repeatedly
checks if the maximum
temperature in Beijing
exceeds 25℃.
Step2 Select Devices, click Connect, and click Upload. See if Codey Rocky
can display the highest temperature of cities around the world as intended.
Step3 Click the icon to see if the sprite panda displays the maximum
temperature of Beijing as programmed.