Each pie wedge had foil in different areas and there were two brushes ... Real rotary position encoders use Gray code to prevent slight misalignments and border cases from being a problem.