You add to Arduino Encoder Library
- Sketch -> Include Library -> Manage Libraries... Filter your search... -> "Encoder" search Encoder by Paul Stoffregen, select and install
the rest http://disc2psx.tistory.com/10
You add to Arduino Encoder Library
the rest http://disc2psx.tistory.com/10