Added example code for the rotary encoder and the due. Tested and works.