If you can't tell me what type of encoder it is and how it's wired, I can't help you very much.
Read the WPILib documentation for the SmartDashboard:

utNumber method. It tells you how to make a value available to other SmartDashboard clients. If you're going to be using the Java SmartDashboard program, you can use the menus to add the new value to the display. If you want to use the LabVIEW Dashboard program, just add an indicator to the Operations tab and give it the same name you used when writing the value.