Case 10 - Display of Weather Conditions

Case 10 - Display of Weather Conditions

 

Part 1   Objective

Use IoT blocks to connect to the network, select a city to obtain its weather condition, then Codey's screen displays the weather condition of the city.

36.gif

Part 2   Preparation

  • Codey (robot controller) x 1

  • USB cable x 1

  • Computer with network access x 1

Connect Codey to the computer by using the USB cable, open mBlock 5 (PC client, web version, or mobile app), delete the default device, click +add, select Codey from Device Library and then click Set as mostly used device in the upper left corner, click Connect, and select the Upload mode.

37.gif
38.gif

Part 3   Programming

  1. Click + extension and then click + Add below IoT.

  2. Use IoT blocks together with Looks blocks and Control blocks, and click Upload to obtain and display the weather condition of a city.

39.gif

Part 4   Practice

  1. Try to obtain the weather condition and temperature of your city.

  2. Try to display the weather condition, the maximum temperature and the minimum temperature of your city in turn.

 

 

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.