Checked with a scope, both channels are rising and falling 90deg apart as expected when measured at header. The weird thing is that it was working briefly, but now is not. It increments a single time when I swap the A and B channels at the pins.
edit: ok now things are weird. When I look at the signals on the scope, everything looks a-ok. When I read the pins in code, one direction, both channels go to zero at the same time, and in the other direction, both channels switch states at the same time. I am very confused.
edit 2: it appears there was a fault with the ground pin on the encoder. It is now detached from the enclosure. Note sure if it’s related to my problem. $30 encoder too. What the heck, Bourn??