@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. 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.