15. How to Use the IOT Blocks (Case 1)

This guide applies to:

mBot2, mBot Neo, and CyberPi.

 

In a Nutshell

Note: Logging in the mBlock 5 account is required before using all IOT blocks.

Case 1: Interact between mBot2 and sprites on mBlock 5 software.

操作指引18-介绍-case1案例.gif操作指引18-介绍1.PNG操作指引18-介绍2.PNG

mBlock 5 has a web version, a mobile application version, and a PC version.

You may also connect the mBot2 via USB or Bluetooth adapter.

 

Step by Step

You can click the sprite on the computer to control the mBot2;

And establishing an interaction between mBlock 5 and the device.


#1 Compile the Program for the Sprites.

操作指引18-步骤-case1-第一步.PNG
After clicking the panda, a "message" will be sent through IOT blocks.

If the panda makes a voice and the panda is moving, the message is successfully sent.

After the device receives the message, it can make a corresponding response.

操作指引18-步骤-case1-第一步-视频.gif

#2 Compile Programs for mBot2.

操作指引18-步骤-case1-第二步.png

When we compile programs for the sprite in the first step, we have already settled that the sprite will send messages through IOT blocks.

 

When mBot2 receives the message from the sprite via the network, it will make a relevant response, indicating that interaction between the sprite and the device is realized.

 

If your Wi-Fi works properly, you will see the green light is on once the CyberPi is turned on.

操作指引18-步骤-case1-第二步-视频.gif

For how to connect mBot2 to mBlock 5, please see this guide:

How to Connect mBot2 to mBlock 5

 

#3 Interact Between mBot2 and Sprites

操作指引18-步骤-case1-第三步.png
操作指引18-介绍-case1案例.gif

You can also control the sprite through program design.

  • For example, move the sprite on the mBlock 5 by operating the device. (You can design the program on your own by referring to the examples in this article)

Interaction between sprites and machines can take place on different devices. You may find the saved programming work on mBlcok-My work when you log in to your account on different devices.

  • If you compile and save the program on the computer, the sprite can still interact with the machine via a mobile phone.

Each sprite can interact with different devices after the programming work is uploaded to those machines.

  • For example, if you upload the work to CyberPi and mBot2 respectively, the sprite will interact with CyberPi and mBot2 in the meantime.

 

Related Knowledge

https://support.makeblock.com/hc/en-us/articles/15991034647447

https://support.makeblock.com/hc/en-us/articles/1584891701186

https://support.makeblock.com/hc/en-us/articles/15905549830039

https://support.makeblock.com/hc/en-us/articles/15850718565399

 

Got Questions?

Feel free to contact us at:

service@makeblock.com

 

Help Us Solve Faster

We have listed some useful information you can provide to us. When you contact us, the more information you provide, the better informed we will be and the quicker we can advise and answer your questions.

复用图-联络客服-提供信息.png

Not Sure Where to Find the Version Info?

复用图-联络客服-查看版本教程.png

 

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

Comments

0 comments

Article is closed for comments.