01-20
2022Choice of Angle sensor
Angle sensors, as the name suggests, are used to detect angles. It has a hole in its body that fits into a Lego shaft. When attached to the RCX, it counts every 1/16 turn of the shaft. When rotated in one direction, the count increases, and when the direction of rotation changes, the count decreases. The count is related to the initial position of the Angle sensor, when initializing it, its count value is set to 0, and you can programmatically reset it if necessary. When wheels are attached to the robot (or the robot is moved by gearing), the distance the robot has traveled can be inferred from the Angle of rotation and the number of wheel circles.