Get the weather forecast

Get the weather forecast via the internet and change the movement according to the weather.

For example, it would be convenient to be able to raise a flag if it rains.

Weather block

Use the weather block to get the weather.

This block has a place to put the area name and a place to specify the weather. If you put it in a block and use it.

In the case of the block above, if the weather in Tokyo is cloudy, it is a block.

Use this to raise the flag if it rains and lower the flag otherwise.


(This program will run in the cloud in the next lesson, so we recommend creating a new one in the repository.)

The program looks like this.

If you can connect and the kit can be connected, use the block to separate the programs depending on whether it is raining or not.
If it rains, raise the flag, otherwise lower it.

When you run the program, it will get the weather and raise or lower the flag.
It also appears as text on the on-screen console.