Gyro sensor - Wait block Pro Preview

We already know how the Gyro sensor works. Now it is time to see how we could use it. 

To access the full video please subscribe to FLLCasts.com

Subscribe

  • #1200
  • 12 Apr 2019

As all the sensors, the Gyro sensor also has a setting in the Wait block

The block has two settings:

  • change
  • compare

We would focus mainly on the compare setting. If you position your mouse you will see that it has two modes:

  • Angle - the robot compares the measured degrees of turn with a specific input value. Before continuing to the next block in the program the Wait block waits until the comparison returns true.content picture
  • Rate - the robot compares the rate of change of the number of degrees the sensor measures. How many degrees per second is the sensor measuring. The block waits for the comparison to return true before continuing to the next block in the program.content picture 

The last setting we should pay attention to is the port on which the sensor is plugged in. By default it is plugged in on port 2, but it could be on any of the 1-4 ports. 

picture of EV3-G program with a wait block for a Gyro sensor with an arrow of where the setting for port number is located.

An important part of programming the Gyro sensor is that when it is turned on it starts measuring from 0 degrees. After that all turns in clockwise direction are considered positive, while turns in counter-clockwise direction are considered negative.

Rate value differs from degrees value - it always measures 0 when the sensor is not moving.  

Courses and lessons with this Tutorial

This Tutorial is used in the following courses and lessons

Image for Level D2. "Seafaring". Robotics with LEGO
  • 24
  • 2:49
  • 107
Image for Lesson 1 - Pedalo for fishing
  • 4
  • 4
  • 10
  • 3d_rotation 1
Image for Robotics with LEGO - Level 2.5 - Maritime Journey
  • 42
  • 3:52
  • 133
Image for Robotics with LEGO - Level 4.0 - Kinesthetic and Memory Game (in development)
  • 59
  • 2:58
  • 200