Class SparkFlex

All Implemented Interfaces:
MotorController, AutoCloseable

public class SparkFlex extends SparkBase
  • Field Details

  • Constructor Details

    • SparkFlex

      public SparkFlex(int deviceId, SparkLowLevel.MotorType type)
      Create a new object to control a SPARK Flex motor Controller
      Parameters:
      deviceId - The device ID.
      type - The motor type connected to the controller. Brushless motor wires must be connected to their matching colors and the hall sensor must be plugged in. Brushed motors must be connected to the Red and Black terminals only.
  • Method Details

    • getExternalEncoder

      public RelativeEncoder getExternalEncoder()
      Returns an object for interfacing with an external quadrature encoder
      Returns:
      An object for interfacing with an external quadrature encoder