Skip to lesson
Westlake RoboticsLearn
Vault

FIRST Tech Challenge

Loading progress…

  • Build a Reusable RobotHardware Template
  • Motors, Servos, and Sensor Sanity Tests

Motors, Servos, and Sensor Sanity Tests

Device-specific tests before full robot code.

Hardware EssentialsCore

In this lesson, you will:

  • Test one actuator at a time.
  • Respect servo ranges and motor modes.
  • Read sensor values before using thresholds.

Concept narrative

Motors create continuous motion, servos seek positions, and sensors produce measurements. Treating them as interchangeable is how teams break mechanisms or write logic from unverified assumptions.

Robot mental model

A device test is a microscope. It removes the rest of the robot so the team can see whether the device, wiring, configuration, and code agree.

Implementation walkthrough

Write a motor direction test, a servo sweep with safe endpoints, and a sensor telemetry test. Each test should be short enough to run at an event without risking the whole robot.

DeviceTests.javaJava

double cm = distance.getDistance(DistanceUnit.CM);
boolean close = cm < 8.0;
telemetry.addData("distance cm", cm);
telemetry.addData("close", close);
servo.setPosition(gamepad1.a ? 0.35 : 0.10);

Common mistakes and debugging

A servo that hums may be mechanically bound. A motor that moves backward may need direction setup. A sensor threshold that works in the shop may fail under field lighting. Isolate before integrating.

Practice

Create three device test OpModes: motor, servo, and distance sensor. Record safe ranges and expected readings.

Checkpoint

  • Each device has a safe test.
  • Telemetry shows raw readings.
  • Thresholds are justified by observations.
  • The test record includes the setup, prediction, and observed result.
  • A teammate can repeat the check from the saved evidence without guessing.

Reflection check

Check your understanding before moving on.

Before using a distance reading as an autonomous threshold, what should the team do?
Why test a new servo through a narrow, observed range first?

0 of 2 answered

References

FIRST FTC DocsOfficial SDK, Robot Controller, and programming reference.Learn Java for FTCFTC-focused Java book and exercises by Alan G. Smith.Game Manual 0FTC community reference for programming, controls, and robot design.
Loading lesson progress
Previous lessonBuild a Reusable RobotHardware TemplateNext lessonDriver Control