Rotary encoder registers 4 times as much

Delta_G:

(digitalRead(DataPin)== A)

What's the A?

A should be HIGH or reverse LOW
Made the change below already thanks for the catch. missed during simplification :slight_smile:
I'll post the slightly more complex version if OP need it.