Skip to content

Quiz: Building and Programming a No-Display STEM Robot

Test your understanding of building and programming a no-display STEM robot with these review questions.


1. What is an H-bridge?

  1. A sensor that reports how far a wheel has rotated
  2. A rigid frame that holds a robot's motors, wheels, and electronics
  3. A component that outputs a steady, fixed voltage regardless of input fluctuation
  4. An arrangement of four electronic switches wired in the shape of the letter H that can route current through a motor in either direction
Show Answer

The correct answer is D. An H-bridge is an arrangement of four electronic switches wired in the shape of the letter H, with the motor connected across the crossbar; closing different switch pairs routes current through the motor in either direction, stops it, or brakes it. Option A describes a wheel encoder, option B describes a robot chassis, and option C describes a voltage regulator.

Concept Tested: H Bridge


2. What is differential drive?

  1. A single motor connected to a mechanical steering linkage that turns the front wheels
  2. A sensor system that detects a line painted on the floor
  3. A drive system where two independently controlled motors, one per side, produce turning by running at different speeds
  4. A safety mechanism that halts a robot's motors regardless of its current behavior state
Show Answer

The correct answer is C. Differential drive is a drive system where two independently controlled motors, one per side, produce turning by running at different speeds rather than by pivoting any wheel — the steering method used by most two-wheeled robots in this book's price range. Option A describes a car-style steering mechanism this book's robots don't use. Option B describes line following, and option D describes a robot safety stop.

Concept Tested: Differential Drive


3. Why does this book prefer time-of-flight sensors over ultrasonic sensors for STEM robot projects?

  1. Light travels faster and in a narrower beam than sound, making time-of-flight readings quicker, more precise, and less prone to stray echoes
  2. Time-of-flight sensors are cheaper to manufacture than ultrasonic sensors
  3. Ultrasonic sensors cannot be read using MicroPython
  4. Time-of-flight sensors do not require any calibration
Show Answer

The correct answer is A. The chapter explains that light travels far faster and in a narrower beam than sound, so time-of-flight readings tend to be quicker, more precise, and less prone to picking up stray echoes off nearby walls or other robots. Option B is not a claim the chapter makes about relative cost. Option C is false since ultrasonic sensors are read with MicroPython in the chapter's own example code, and option D is false — both sensor types still need calibration.

Concept Tested: Time Of Flight Sensor


4. What role does a voltage regulator play in a robot's power system?

  1. It stores electrical charge to power the robot during brief power interruptions
  2. It takes a variable input voltage, such as a discharging battery, and outputs a steady, fixed voltage to protect sensitive electronics
  3. It measures how far a wheel has rotated to correct motor speed mismatches
  4. It amplifies a weak logic signal into enough current to spin a DC motor
Show Answer

The correct answer is B. A voltage regulator takes a variable input voltage, like a battery that drifts as it discharges, and outputs a steady, fixed voltage regardless of that fluctuation, protecting sensitive electronics like the Pico from ever seeing more voltage than they're rated for. Option A describes a capacitor's or battery's role, option C describes a wheel encoder, and option D describes a motor driver.

Concept Tested: Voltage Regulator


5. How does a robot safety stop differ from a normal decision made within the robot behavior loop?

  1. A safety stop only works while the robot is following a line, not during obstacle avoidance
  2. A safety stop and a normal behavior loop decision are functionally identical, differing only in which pin they use
  3. A safety stop requires the robot to finish its current turning radius before it can take effect
  4. A safety stop overrides the normal behavior loop entirely, halting the motors regardless of what the current behavior state says the robot should be doing
Show Answer

The correct answer is D. A robot safety stop is any mechanism that halts a robot's motors regardless of what its current behavior state says it should be doing, overriding the normal behavior loop entirely rather than waiting for the loop's next decision point. Option A wrongly restricts it to one behavior. Option B ignores its override priority, and option C invents a delay condition the chapter's emergency-stop code explicitly avoids by checking the flag first.

Concept Tested: Robot Safety Stop


6. A student calls drive(80, 20) on a robot using this chapter's differential-drive interface, where the first argument is left motor speed and the second is right motor speed. What motion results?

  1. The robot pivots in place with a turning radius of zero
  2. The robot drives straight forward at full speed
  3. The robot curves toward the right side, since the right motor is spinning slower than the left
  4. The robot drives backward while curving left
Show Answer

The correct answer is C. When the two motor speeds differ, the robot curves toward whichever side is spinning slower; here the right motor (20) is slower than the left motor (80), so the robot curves right, matching the chapter's own "gentle right turn" example. Option A would require equal-but-opposite speeds. Option B requires equal speeds, and option D is wrong since both speeds are positive, meaning both motors drive forward.

Concept Tested: Turning Radius


7. In the chapter's line-following code, the left sensor reads 1 (over the dark line) and the right sensor reads 0 (over the light floor). Which drive() call does the program execute?

  1. drive(70, 70)
  2. drive(30, 70)
  3. drive(70, 30)
  4. drive(0, 0)
Show Answer

The correct answer is B. The code's second branch, elif left_on_line and not right_on_line, matches exactly this sensor state and calls drive(30, 70), slowing the left motor to steer the robot back toward center. Option A only applies when both sensors detect the line. Option C applies to the opposite sensor state (right on, left off), and option D applies only when neither sensor detects the line.

Concept Tested: Line Following


8. A student writes code that sets left_forward.duty_u16(30000) and left_backward.duty_u16(20000) at the same time, without setting either to zero first. Based on the chapter's H-bridge warning, what is the most likely consequence?

  1. The H-bridge will be commanded to drive current in both directions at once, risking overheating and a motor stall condition
  2. The motor will spin faster than normal, combining both duty cycles
  3. The motor will automatically default to a stopped, coasting state
  4. The Pico's ADC will reject the conflicting duty cycle values
Show Answer

The correct answer is A. The chapter's warning explains that sending both forward and backward pins a nonzero signal at the same time commands the H-bridge to fight itself, driving current in opposite directions through the same motor, which can overheat the driver and cause the motor to stall rather than spin. Option B and C both describe outcomes the chapter contradicts directly, and option D misapplies the ADC, which is unrelated to PWM output pins.

Concept Tested: Motor Stall


9. A student commands equal duty cycle values to both the left and right motors, but the robot consistently curves to one side instead of driving straight. The motors and wiring both test correctly with a multimeter. What is the most likely cause, based on this chapter?

  1. The robot's H-bridge is stuck in brake mode on one side
  2. The distance sensor is miscalibrated for the testing arena's floor
  3. The battery pack's rechargeable cells have reached the end of their lifespan
  4. One of the drive wheels is misaligned, fighting the other wheel and pulling the robot off a straight line even with matching motor commands
Show Answer

The correct answer is D. The chapter specifically warns that a misaligned wheel actively fights the other wheel, pulling the robot off a straight line even when both motors are told to spin at exactly the same speed — and this fits the scenario since the electrical wiring already tests correctly. Option A would typically show up as one motor not moving at all, option B is unrelated to straight-line driving, and option C would affect overall power, not directional pull specifically.

Concept Tested: Wheel Alignment


10. A robot's obstacle-avoidance behavior works reliably in the classroom's testing arena but stops too late (or too early) when tested on a different floor at home. What does the chapter identify as the most likely explanation?

  1. The robot's chassis assembly loosened during transport between locations
  2. A distance threshold tuned under one floor's conditions may need recalibrating for a different surface, since carpet and hard floors reflect sound and infrared differently
  3. Time-of-flight sensors only function correctly inside a designated testing arena
  4. The robot's behavior loop resets its state machine whenever it changes locations
Show Answer

The correct answer is B. The chapter explains that robot calibration must account for actual operating conditions, giving the specific example that a distance threshold tuned on a carpeted floor may need retuning on smooth tile, since carpet can absorb sound and infrared differently than a hard surface. Option A invents an unrelated mechanical failure, option C incorrectly limits sensor function to one location, and option D misapplies the behavior loop's state machine, which does not reset based on location.

Concept Tested: Robot Calibration