Wires for multi-threaded EV3 programs Pro Preview

What happens if we need to perform some actions simultaneously from the middle of a program. Let us assume that we have a multi-threaded task at hand, but before it we need to rotate our robot at 360 degrees.

To access the full video please subscribe to FLLCasts.com

Subscribe

  • #1168
  • 22 Mar 2019

The task may be like this: we want to program our robot to move in a square and meanwhile it needs to move a hand with another motor.

On one hand, if we add the 360 movement to the thread where the robot moves in a square, the robot will move its hand while doing a full circle. On the other, if we add the 360 movement to the thread where we operate the hand, the robot will be confused, because we would want him to move in a square and move in circle simultaneously. That is why we use wires in such cases.

You can select the Sequence Plug Exit to align block as shown below:

However, if the blocks are aligned and you select it, a gap between the two blocks will appear:

Now, if you put several blocks outside of the main thread

and select again on the Sequence Plug Exit, we could drag a new wire and connect those blocks.

Courses and lessons with this Tutorial

This Tutorial is used in the following courses and lessons

Image for Instructors Remote Training
  • 136
  • 280:11
  • 156
Image for Threads and Multi-threading
  • 5
  • 1
  • 9
  • 3d_rotation 1