Menu
May 1, 2017 Lesson

Learning Target: Learn how the ultrasonic sensor works and use it to detect objects ahead

 Lesson Sequence:

  1. Begin by watching the Ultrasonic video:

    https://cs4hsrobots.appspot.com/unit?unit=25&lesson=55

  2. Attach the Ultrasonic sensor to your Domabot (see page 9 of the build instructions) and connect it to port 4
  3. Write a program to:
    1. Move forward  
    2. Detect an object that is less than 20 cm away
    3. Say “object detected”
    4. Stop
  4. Write a program similar to the one demonstrated in the video:
    1. Say “Hooray”
    2. Move forward while playing a few tones
    3. When an object is less than 25 cm away, stop
    4. Say “Object detected”
  5. Click here for Robot Project 4 Challenge
  6. Write a program using the ultrasonic sensor to walk within a box without hitting the side walls