上QQ阅读APP看书,第一时间看更新
Measuring distance to control speed
The EV3 IR sensor can also provide a rough distance estimate for the beacon by measuring the strength of the signal it receives from the beacon. This can be accessed by using the proximity output on the IR sensor block. This distance figure is not expressed in centimeters or inches but rather serves as a relative distance figure. It is not perfectly accurate, either. However, we can still make use of this by making the tank slow down when the beacon gets near.