What sort of display have you got? Basically use the rotary encoder example and feed the output number to your display.