An example of solving a problem on the interaction of two robots
Send message "5" from one robot and receive it on another.
Please note that the task can only be solved in real robot mode.
To solve the problem, you have to:
- 4.Run programs on robots.
2. Enter a
messagevariable for the message and initialize it by assigning it the number
5in the "Expression" block.
3. Add "Send message" and "End" blocks. In the properties of the "Send message" block, specify the onboard number of the robot to which you want to send the message and the variable containing the message.
2. Add the "Receive message" block. In the block properties, specify the variable in which you want to write a message sent from another robot. The variable can be named whatever you want. Set the "Wait for message" property to
3. After the message has arrived, display it on the robot's screen for 3 seconds, and then finish the algorithm. To do this, add blocks "Print Text", "Timer" and "End". In the properties of the "Print text" block, check the
Calculatebox and specify
truein the "Update image" field.