Skip to main content

Roll It Red

Use [Drive for] and [Turn for] blocks to drive the Hero Bot to a Roller, and use the Optical Sensor and the intake motor group to detect the Roller and spin it to red. 

  • Select the VRC Virtual Skills - Spin Up Playground.
  • Drive the Hero Bot toward a Roller.
  • When the Optical Sensor detects the Roller, drive the Hero Bot closer to make contact.
  • Code the robot to spin the intake motor group to spin the Roller.
  • When the Optical Sensor detects red after detecting blue, stop rolling the Roller.

Helpful Hints

  • Use the RollerOptical sensing block from the Sensing category to detect a Roller close to the Hero Bot.

    Intake Motor Group Block

    • Matching Python command:

Intake Motor Group Block

  • Use the RollerOptical sensing block from the Sensing category to detect the color.

    Intake Motor Group Block

    • Matching Python command:

    Intake Motor Group Block

  • Use the spin IntakeMotorGroup block from the Motion category and select the outtake direction to spin the Roller.

    Intake Motor Group Block

    • Matching Python command:

    Intake Motor Group Block

  • Use the stop IntakeMotorGroup block from the Motion category to stop spinning the Roller.

    Intake Motor Group Block

    • Matching Python command:

    Intake Motor Group Block

For more information about the robot features in VRC Virtual Skills, please see this article.