Case 10 - Display 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.


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 or web version), delete the default device, click +add, select Codey from the Device Library and then click Set as mostly used device in the upper left corner, click Connect, and select the Upload mode.



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.


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



Please sign in to leave a comment.