Hardware Module
The hardware module wraps the raw FTC SDK hardware classes (DcMotorEx, Servo, IMU, and so on)
in classes that lazily resolve devices from the hardware map on first use,
and give you a more convenient, consistent API across every device type.
Creating hardware
Section titled “Creating hardware”Every device wrapper in this module can be constructed the same two ways: by its Lynx Module and port, or by its configuration name from the Driver Station.
// By Lynx Module and port, recommendedval servo = NextServo(RobotController.controlHub, 0)
// Using your configuration nameval servo = NextServo("armServo")// By Lynx Module and port, recommendedNextServo servo = new NextServo(RobotController.controlHub(), 0);
// Using your configuration nameNextServo servo = new NextServo("armServo");Constructing by Lynx Module and port is recommended,
since it skips the hardware map’s name lookup and lets NextFTC talk to the module directly.
Either way, the underlying device isn’t actually resolved until you first use it,
so it’s always safe to declare hardware as fields on your Mechanism.
What’s in this module
Section titled “What’s in this module”ActuatorsMotors, servos, continuous-rotation servos, and feedback servos.
SensorsIMUs, Pinpoints, color/distance/digital sensors, and analog inputs.
MiscellaneousLimelights, HuskyLens, and RGB indicators.

