Skip to main content

Outline the Goals of the Green Disks

To better understand how the project will be built, we will first outline what should happen in the project using comments.

Two green disks will be moved on the conveyors. The first green disk will be picked up and placed to a known drop off location, and the second green disk will be diverted off of the Exit Conveyor.

Green Sort Divert

The Optical Sensor near the Entry Conveyor will be used to track if a green disk has already been picked up and placed. This allows any other green disks introduced via the Disk Feeder to be diverted off of the Exit Conveyor.

Optic Sensor Detection

Before a variable can be used to track if the green disk has already been placed, the variable must first be created.
 

  1. Because the project is started with no disks placed, the Boolean variable should be set to ‘false.’ Add a [Comment] block to the [Set motor velocity] block in the {When started} stack of blocks and change the comment to, ‘Initialize Boolean variables to 'false' before handling disks.’

    Change comment

    Now that the comment has been added to make the variable used to store true and false values, other comments can be added to determine how it can be used to track if a green disk has been placed.
     

  2. Add a [Comment] block to the [Wait until] block in the {define Green Detected} stack of blocks and change the comment to, ‘Determine if a green disk was already placed.’

    Adding comment

    The first green disk will ultimately be placed in a known drop off location.

    Green Sorted

    The disk must pass through the Diverter and stop in front of the Exit Sensor to be picked up and placed.

    Path Callout Green

    Once the first green disk is picked up and placed, a second disk will be introduced to the Disk Feeder. The Optical Sensor will detect that a green disk has already been picked up and placed, and this second green disk will be diverted off to the Exit Conveyor.

    Green Sort Divert Path
  3. Add three additional [Comment] blocks and change the comments to:

    1. If green disk was already placed, divert green disk off Exit Conveyor

    2. If first green disk, set Diverter to allow disk to pass, stop at Pickup Sensor

    3. Use the arm mounted on the VEX V5 Workcell to place green disk at drop off location

    Add three comments

    Once the green disk is placed at the drop off location, the variable used to track if the green disk has been already placed or not, will need to be set to ‘true.’
     

  4. Add an additional [Comment] block and change the comment to, ‘Track green disk as placed.’

    Add additional comment