15. Parallel Beams

You must first complete 14. Introduction to MY BLOCKS before viewing this Lesson

Parallel beams allow you to run two or more blocks at the same time. What if you have one or more attachment arms connected to motors and you want to turn these arms while the robot is moving to complete a mission.

15.1. How Do I Make a Parallel Beam?

To create a parallel beam click and drag on the bump on the right center of any block and release once you hover over the inverted bump on the left center side on a block.

Note: Blocks before the split will run one at a time. After the split blocks on the two “beams” will run at the same time

15.2. Parallel Beam Synchronization

– Parallel beams are great for doing two things at the same time
– Often want to do something after you complete the Parallel Beam
– Hard to tell which beam will finish first (called the “synch problem”)
– Need to synchronize the beams to make sure that blocks execute when you expect them to.

In the picture below, will the turn start after motor A is done or before?

Ensure That Both Beams Finished

There are several ways to do this:
– Variables
– Wires
– Loops
– My blocks

1. Use Variables To Synchronize

2. Use Loops to Synchronize

Back to: Module 3. Programming