SparkMax
- class rev.SparkMax(deviceID: SupportsInt, type: rev._rev.SparkLowLevel.MotorType)
Bases:
SparkBaseCreate a new object to control a SPARK MAX 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.
- property configAccessor
Accessor for SPARK parameter values. This object contains fields and methods to retrieve parameters that have been applied to the device. To set parameters, see SparkBaseConfig and SparkBase::Configure.
NOTE: This uses calls that are blocking to retrieve parameters and should be used infrequently.
- configure(config: rev._rev.SparkBaseConfig, resetMode: rev._rev.SparkBase.ResetMode, persistMode: rev._rev.SparkBase.PersistMode) rev._rev.REVLibError
- getAbsoluteEncoder() rev._rev.SparkAbsoluteEncoder
- getAlternateEncoder() rev._rev.SparkMaxAlternateEncoder
Returns an object for interfacing with a quadrature encoder connected to the alternate encoder mode data port pins. These are defined as:
Pin 4 (Forward Limit Switch): Index Pin 6 (Multi-function): Encoder A Pin 8 (Reverse Limit Switch): Encoder B
This call will disable support for the limit switch inputs.
- getForwardLimitSwitch() rev._rev.SparkLimitSwitch
- getReverseLimitSwitch() rev._rev.SparkLimitSwitch