The upper and lower limit switches will wire up to the Rev SparkMax limit switch ports. Configure the SparkMax so output is shut off in the approprate direction when the limit switch is activated.
Add in logic such that when the upper or lower switch is pressed, the measured angle of the arm is reset the the appropriate number. This is to say that there is some "angle offset" in the code which converts from the angle reported by the SparkMax to the physical angle. When the limit switch is pressed, you know the physical angle and the SparkMax reported angle, so you should be able calculate what the offset is.
The upper and lower limit switches will wire up to the Rev SparkMax limit switch ports. Configure the SparkMax so output is shut off in the approprate direction when the limit switch is activated.
Add in logic such that when the upper or lower switch is pressed, the measured angle of the arm is reset the the appropriate number. This is to say that there is some "angle offset" in the code which converts from the angle reported by the SparkMax to the physical angle. When the limit switch is pressed, you know the physical angle and the SparkMax reported angle, so you should be able calculate what the offset is.