Bỏ qua nội dung

Lesson 6: The distance sensor

English

The distance sensor

  • At the front of the robot is a distance sensor. front_distance.get_distance(MM) tells you how far the robot is from the wall in front.
  • On the playground a red dashed line shows each reading.
  • With a sensor, one program works even when the walls move.

Words for this lesson

Word Meaning
sensor a part that measures something
while repeat while something is true
wait do nothing for a short time: wait(5, MSEC)
MSEC milliseconds; 1000 MSEC = 1 second

Đăng nhập hoặc tạo tài khoản

IGCSE, A-Level & AP