#How to Make an AI Robot Recognize the Weather

TOP How to.png__PID:c615bb61-4241-4aea-8a06-273967cd4749

In today's technological era, Artificial Intelligence (AI) is increasingly influential, especially in weather forecasting. Creating your own AI assistant for forecasting weather conditions offers valuable learning experiences for both kids and educators.By programming a robot to identify the date, weather, temperature, and humidity, children can ignite their interest in coding while teachers gain a fresh, innovative teaching tool.
This #HowTo guide will empower you to utilize your programming skills to develop an AI assistant that can accurately forecast  weather in your surroundings.

How to get kids to learn science by forecasting weather

·Observation and Measurement: With the AI assistant providing forecast weather data, children can venture outside or stay indoors to observe weather phenomena. They can utilize thermometers and hygrometers to accurately measure temperature and humidity, enhancing their understanding of weather dynamics.

·Exploring Weather Phenomena: Discuss the influence of temperature and humidity on forecast weather, enabling children to learn about fundamental principles of weather prediction while developing scientific reasoning and observational skills.

·Participation in Science Projects: Encourage children to engage in science projects that focus on forecast weather and climate research, promoting teamwork and inspiring curiosity about the natural world.

8a4f7f64-bf6f-4fad-8671-c92f11067895.jfif__PID:bc1f50f4-de66-4829-bc31-789997a7ba46

Enhancing Learning with AI: mBot2's By Asking Feature for Interactive Education

• In the field of artificial intelligence (AI), the concept of "by asking" typically refers to a way of interacting and controlling through verbal inquiries or questions. It mainly involves using natural language processing and internet connectivity to retrieve information and perform tasks, enhancing the interactive capabilities of robots and automated systems.

• How can we help children understand this concept using mBot2? We have created a related case study."When you ask mBot2 to forecast the weather, it can quickly answer by searching for information online."

• This feature not only demonstrates the application of AI in understanding and executing verbal commands but also helps children see how AI robots retrieve and utilize information from the internet to provide assistance. This showcases the integration of Internet of Things (IoT) technology.

How to write a weather forecasting program

Step1:Preparation

• An assembled mBot 2 cart.
• Type C cable*1
• A computer with internet access

After assembling the mBot 2, use the data cable to connect the mBot 2 to your computer, open the Wise Programming Tool (desktop, web, mobile), connect to the mBot 2, and switch to upload mode.

连接.png__PID:f62b2940-f967-4e23-b85f-7acd9a4e67ca

Step2:Programming

Substep 2.1: Connect To The Network

The first step in programming is to get the mBot2 connected to the network. This step is crucial because it allows the device to access Internet resources for real-time data processing and communication.

First, drag a hat block from "Events" and place it on top of the other blocks to activate them.

Next, take out the blocks for connecting to Wi-Fi from "IoT" and fill in the Wi-Fi name and password.

Then we need to check whether the Wi-Fi connection is successful, and drag the wait condition from "Control".

• Drag the "network connected?" block from "Control" and put it into the waiting condition.

Finally, drag the colored lights from "LED" as the condition for a successful Wi-Fi connection.

connect WIFI.png__PID:a89425f0-f64f-4169-8477-86cd029b4d3d


With the above steps, mBot2 will be able to connect to a Wi-Fi network. Next, we will program mBot2 to interact with us!

Substep 2.2: Write a speech recognition judgment program

With the above procedure of connecting to the network complete, we have taken the first step in programming. By connecting to the network, we have gained the ability to interact with the online world, which lays the foundation for our subsequent work. Next, we will work on programs for recognizing speech and recognizing weather.

By recognizing voice, our AI robot will be able to understand human commands and needs; and by recognizing weather, we can make the AI robot an intelligent forecasting weather expert, providing us with timely and accurate weather information.

• First, drag the "forever" block from "control".

• Then drag out the speech recognition block in "AI", change the language to English, and set the recognition time to 2 seconds.

• Then drag out the judgment condition block from "control".

• Put the speech recognition result block in "AI" into the inclusion condition block in "Operators", and fill in "weather" as the recognition condition.

• Finally, put the speech recognition result into the display label of "Display", and then put the display label block into the else condition.

After completing this step, when the machine fails to recognize "weather," it will display the speech it recognizes on the screen. We will be able to understand the reason why it was not recognized by the display.

program 2.png__PID:14fb4afb-dcb7-4fa4-9e77-525878fc8fda


Substep 2.3: Write a date recognition program

After completing the else step, we will write the program that will make the AI robot react to the recognition of "weather".

• Find the speak block in "AI" and drag it to the judgment condition block, then change the text to be read out to "Today's date is".

• Then drag the time block from "IoT" into the speak block, then click on "UTC", find the time zone of your city and select it, then select "week" for the time.

weather date.png__PID:4afbdcb7-9fa4-4e77-9258-78fc8fda2bf4


• After the robot tells the time, it has to display the obtained time on the screen by selecting the print and line feed block from "Display" and writing "Today's date is" in the text.

• Finally, put the time block into the printed and line feed block and the display will show the time of the day.

program 6.png__PID:9e775258-78fc-4fda-abf4-5bd9191dab63

By this point, we've been able to get the AI bot to tell us the day's date by voice and display it on the screen. The next step is to write a weather recognition program.


Substep 2.4: Write the weather forecasting program


Before writing a weather forecasting program, let's get acquainted with the weather block.

weather l.png__PID:191dab63-2b20-4ec6-9109-d90687b3db43


• Click on "location" to enter your city and select it.

• The second option allows you to select weather information, including temperature, weather, and humidity.

Next, we will program using this block


• Same procedure as for the date program, replace the text with "weather", "temp", and "humidity".

• Change "location" to the city where you want to know the weather information.

• Then select the option at the back of the weather block that corresponds to the text of the previous block.

• Finally, write the text to the display block as before, and put the weather block into the "Display" block.

program 3.png__PID:53305694-b9bc-4a52-bc09-b85fd9824023


Substep 2.5: Supplementary text size and volume


Add the set text size and volume to the top program and the program is complete!

program 4.png__PID:72f231fc-65f8-49f5-81ab-a3c200f1bc1f

Now we'll be able to control the AI robot with our voice and have him forecast weather information and display it on the screen.

Full Program & Download

Click to download and let your robot forecast weather for you!

click.png__PID:4ffa2ad3-802b-42de-8b1d-5cfd34bca611
program 5.png__PID:a3c200f1-bc1f-40f4-9e66-4829fc317899
mBot2.jpg__PID:9c2f00ca-353a-4b87-bba8-997bd6ef2d4e

Makeblock mBot2: STEM Education Coding Robot Kit for AI Learning

$139.99
$149.99