wiki:UsingActuators

Version 2 (modified by fkarim, 10 years ago) (diff)

--

In the subsystem, create the actuator (piston, talon, etc.). eg. private CANTalon lifterMotor = new CANTalon(Ports.ARM_CIM);

Then, create a function that does what you want. eg. public void moveLifter(double speed) {

...

}

If you need to get input, create a small function that returns the value. eg. public double getCurrentHeight() {

return armNDOF.getHeight(SensorEnum.ARM_NINE_DEGREES_OF_FREEDOM);

}