Encoders are scary at first, but really are not difficult. Basically, an encoder of the type I think you have (you don’t state it, but connected to a TB is likely a US Encoder) gives out X number of pulses for each revolution, from 2 different outputs. You count pulses to determine movement, limited by the number of pulses per revolution*
2 outputs allow you to determine direction, not just movement.
Counting the pulses and comparing that to time allows you to determine speed.
It is possible to count the pulses, including the direction information, and know the absolute position of the arm. I think a Potentiometer may be a better choice, however, since it is better suited to position sensing because of its greater sensitivity to small movements and its lack of dependence upon counting (which, if fouled up, becomes inaccurate). Also, see the * note for a discussion of resolution. A potentiometer is also simpler to program, since it uses an analog input, the voltage being related to the arm position. The downside is you mount it on the arm, not the gearbox.
As for programming, there is sample code as others mentioned, but basically you count pulses and keep track it them. I can’t help you with Talon programming; I suggest you use the Talons as motor controllers only until you get some experience, since LV is more easily troubleshot.
*If you have an encoder that delivers 128 pulses per revolution (PPR), the best you can get is to detect 1/128th of a revolution. This may limit what you can accomplish.
2 outputs are not in-phase with each other, but they are digital pulses, so if one output signals before the other, you are sure it is going in one direction, and if the other output signals before the first, then it is going in the other direction. This works pretty well, by the way.
Try things, explain the problems encountered here, we’ll help.