Answer Key: See,Touch, Repeat_Unit_Level_Quiz

Answer Key: Unit Quiz

  1. The electrical switch inside the Touch sensor is closed when the sensor is pressed.  This causes an electrical current to flow and changes the sensor value from “0” (open) to “1” (closed).
  2. The Ultrasonic sensor emits high frequency sound (higher than the human ear can detect) and measures the time it takes for this sound to echo/reflect back to the sensor.  By dividing this roundtrip time in half and knowing what the speed of sound is, the sensor can provide a reading of the distance to an object (in centimeters or inches).
  3. A threshold is a cut-off value that divides a range of numbers into two groups – those above the threshold and those below.
  4. The Ultrasonic sensor uses greater-than (>) to define “far” and less-than (<) to define “near”.
  5. When the program beam reaches the Loop block, it either loops forever or check the Condition set by the block parameters ( time, sensor, logic).  If the Condition is not met (or the Loop is set for “forever”) the program returns to the beginning of the Loop and runs the contents of the Loop again.  If the Condition is met, the program exits the Loop and runs the next block in the program.
  6. The Loop block only checks its Condition at the moment when the program reaches the Loop block.  If there are blocks inside the Loop that take significant amounts of time (“Wait-for” or “Move” blocks set for large durations) then the loop Condition may not be checked very often.  If there are only quick blocks inside the Loop (“Move” blocks set for unlimited or stop) then the Loop Condition will be checked frequently (up to hundreds of times per second).
  7. The program had large duration Move blocks inside the Ultrasonic Sensor-Controlled Loop.  Each of these Move commands had to be completed before the sensor could be checked again.  Only if the obstacle was present when the Loop block was checked (at the end of the turn) did the tribot detect the obstacle and stop.
  8. The “Wait-for-Touch” block was set for “bumped”.  This means the robot would continue to move after the can pressed the touch sensor, but the stop when it was released (when the can falls of the table).  Since the robot will stop immediately after the can falls, the tribot would not end up on the floor.
  9. The robot will likely not appear to move.  The first Move-unlimited block will turn the motors on and immediately run the next block.  The second Wait-for-Ultrasonic block will detect the object is indeed greater-than 12 inches away and immediately run the next block.  The third block will stop the motors and if this Move block is set to “Brake” the robot will not appear to Move (if set to coast it would roll forward for a short distance).
  10. 1) The forward Move blocks need to be changed from unlimited duration to a fixed duration (and the two durations would need to be different since this is a rectangle, not a square)
    2) The two turning Move blocks need to turn in the same direction
    3) The Loop block count should be set at 2, since Ziffle wants one lap of a rectangle (and the Move blocks inside the Loop create an “L” shape).
  11. Ziffle’s tribot will only stop for an obstacle that is 10 cm away after the “right turn”, since this is the only point in the program when the Loop block checks for an obstacle.  If the obstacle is placed in front of the tribot anywhere else in the zig-zag maneuver, it will be ignored and the tribot will not stop.