@yoshida hi!
Im not sure where you get that #9 should be A5? Looks right to me. The pin is connected to pin 9, and that is D3.
[image: 1535522997329-62649016-d746-4ccb-b360-4e8b7ee1405b-image.png] [image: 1535523012953-7f2024c3-afd9-49ee-bb02-95e6e45275a9-image.png]
For a rotary encoder, it depends on your input - but don't you want an analog signal in? In that case you use the analog pins.
Edit: offcourse, if you use a module converting it to digital like described in the the build section you use a digital pin.