how to connect a 26ASD22-01-1-AJS rotary encoder to arduino nano

Hi,

I am contemplating using a 26ASD22-01-1-AJS rotary encoder for a wind direction vane.
I believe it to be a Absolute type encoder which I have been advised would suitable for this function.

Please have a look at the attached data sheet and let me know what you think.
I would also like to know which sketches in the encoder library would be useable for this encoder

Any help and advise given will be most appreciated, so thanks in advance.

Regards

tyntop

Grayhill-26ASD22-01-1-AJS-datasheet.pdf (17.9 KB)

Define 4 lines as INPUT_PULLUP (eg. 8,9,10,11 - for PORTB) Connect common line to GND. byte pos = (PINDB & B00111100)>>2; //read bits 8..11. Shift 2 places