What will encoders do, how will they help us in teleop, and how do i program them?
Encoders measure the rotation of an axle. You can put them on your drive wheels and they will measure how far you have turned the wheels. Some encoders (called quadrature encoders) are able to give you direction of rotation while other are just able to tell you that the shaft has turned. With that information you can figure out how fast your wheels are spinning by determining how much they have rotated during a certain time interval.
During teleop it is possible to use them to control the velocity of your wheels using a control loop (like a PID controller) this will allow you to ensure that all of your wheels are spinning at the correct speed. You could also travel a certain distance or determine if your wheels are spinning at different rates and correct that to help you keep your robot strait. You could also use them on an arm(though a potentiometer might be better) or a lift so that you could know what position they are in during teleop.
How to program them is more complicated because I don’t know what language you are using but WPILIB has built in support for encoders, so you should be able to get readings rather quickly with any language.
labview is what i am programming them in, hence me posting it in the labview forum.
For programming (and physical wiring) you can look at examples. From the LabVIEW Getting Started Window click on Find FRC Examples…
I can’t find any examples of encoder programs, i would love it if someone could send me an example.
If you go down to find FRC Examples on the mainpage of the LabVIEW program there is an example there.