Which of the following best explains why a repeat until block was used in this project instead of a wait until?

In this Lesson, you will create a project using the Bumper Sensor and [Wait until] block. In the mini-challenge, you will apply these skills to navigate from the beginning of the Wall Maze to the letter ‘A.’

Learning Outcomes

  • Identify that non-waiting blocks have the stack continue even if the block's behavior is not yet complete.
  • Identify that a waiting block pauses the stack until that block's behavior has been completed.
  • Identify that the highlighting of the project's execution visualizes waiting vs non-waiting blocks.
  • Identify that the [Wait until] block is a Control block that accepts Boolean values.
  • Identify that the [Wait until] block will repeatedly check a Boolean condition and will not move to the next block until the condition reports TRUE.
  • Identify that the [Wait until] block is used with a non-waiting block (e.g. Drive) in order to check the sensor condition.
  • Identify that the <Pressing bumper> block reports a TRUE or FALSE value in a [Wait until] block.
  • Identify how the [Drive for] and [Turn for] blocks are special blocks that can be either waiting or non-waiting.
  • Describe how to create a project that has a VR Robot drive forward until the Bumper Sensor is pressed.

Name and Save the Project

  • Start a new project in VEXcode VR and name the project Unit4Lesson2.

[Wait until] Blocks

The [Wait until] block is a Control block that accepts Boolean conditions. [Wait until] blocks repeatedly check a Boolean condition and control the project flow. A project will not move to the next block in the stack until the condition in the [Wait until] block reports as TRUE. The [Wait until] blocks are used in conjunction with non-waiting blocks such as [Drive] or [Turn].

For Your Information

Non-waiting and waiting blocks determine when the next block begins a behavior. Waiting blocks, like [Drive for] and [Turn for], complete their behaviors before moving onto the next block in the stack. Non-waiting blocks, such as [Drive] and [Turn], continue to move to the next block in the stack even if the behavior of the non-waiting block is not complete.

Certain blocks, like [Drive for] and [Turn for] can be waiting or non-waiting blocks. Selecting the arrow on the block will turn the block from waiting into a non-waiting block.

  • Drag the [Drive] non-waiting block into the workspace.
  • Attach a [Wait until] block beneath the [Drive] block.
  • The [Wait until] block accepts Boolean conditions. This project will use the Bumper Sensor to drive through the Wall Maze Playground. Drag the <Pressing bumper> Boolean block into the [Wait until] block.
  • Drag in a [Stop driving] block and add it to the project.
  • Launch the Wall Maze Playground if it is not already open and run the project.
  • Watch the VR Robot drive from the start of the Wall Maze and stop when the Bumper Sensor is pressed by the wall.
  • The [Drive] block allows the VR Robot to keep driving forward while checking the condition of the Bumper Sensor with the <Pressing bumper> block. Once the <Pressing bumper> reports as TRUE, the VR Robot will move to the next block in the stack and stop driving.

    For Your Information

    To follow a visualization of waiting versus non-waiting blocks, watch the code execution highlighting function in VEXcode VR. At the beginning of this project, the green highlight will appear around the [Wait until] block until the condition is met. This is because the [Wait until] block is a waiting block. The green highlight will appear to skip the non-waiting blocks because these commands are quickly executed.

Cookies help us deliver our services. By using our services, you agree to our use of cookies.

The Wiki is working on a dark theme, and you're seeing it! Got feedback? Post on the Wiki Forum Topic.

  • According to the author of the textbook, the explosion of the Union Carbide plant impact the residence of the local community. Identify each of the ways residents were medically affected. Select one

  • Not yet answered Marked out of 1.00 Flag question Question text After the explosion of the Union Carbide plant the fire brigade began to spray a curtain of water in the air to knock down the cloud of

  • Question 9 The rules for a football player receiving a yellow flag for pass interference are as follows: IF a defensive player Holds the receiving player back from moving forward to catch the pass OR

  • Q4 Given: If X, then not Y. If not Y, then Z. Y is true. So: X is unknown, Z is unknown X is unknown, Z is true X is false, Z is true  X is true, Z is true

  • Using everyday knowledge, indicate whether the if-then statements are correct forward-only or both forward and reverse. Statement 1: If Bob is Sally's spouse, then Sally is Bob's spouse. Statement 2:

  • Hi there, I need help with this scenario: In May of the current year, your employer received a PIER report from the CRA that identified Canada Pension Plan (CPP) contribution deficiencies for

Postingan terbaru

LIHAT SEMUA