WIRING of KY-040 Rotary Encoder plus Demo Code

@dallas008866:

Yes, you can. At least it does work that way for me.