Skip to main content

Using the Rotation Sensor

Using the Rotation Sensor

The Rotation Sensor can be used to help complete the challenge in this Lesson to pick up and score Mobile Goals.

Pick up a Mobile Goal

 

The shaft that rotates the Fork Motors on Moby is placed through the Rotation Sensor. This sensor can be used to measure the rotational position, total rotations, and rotation speed of the Forks as they are raised and lowered.

For more information about the V5 Rotation Sensor, see this Knowledge Base article.

Rotation Sensor

The Rotation Sensor can report the current position in degrees and display the value in the Print Console. 

  • The rotational position when the Forks are raised is 0.0 degrees (default at the start of the project).
  • The rotational position when the Forks are fully lowered is 75.0 degrees. 

Fork Angles

The rotation position values can be used in a project to raise and lower the Forks. 

In this example, the Rotation Sensor position is used as a threshold to determine how far the Fork Motors should spin to raise and lower the Forks. 

  • The Fork Motors are coded to spin down until the rotation position is greater than 74. This is because the rotation position is 75 degrees when the Forks are fully lowered. 
  • The Fork Motors are coded to spin up until the rotation position is less than 37. This is because the rotation position at the halfway mark of raising or lowering (half of 75 degrees or fully lowered) is 37.5 degrees.

The value of 37 is used because the Forks do not need to be lifted all the way up to the default position (0 degrees) when carrying a Mobile Goal.

Rotation Sensor project


Select Return to Lessons > to go back to the Lesson Overview. 

Select Next Lesson > to continue to Lesson 4, and learn how to pick up and score Rings from the Field with Moby's Forks.