You are given a plain disc, which is painted half black half white, that can rotate in each direction.
You also have an unlimited amount of digital sensors that can detect those colors - 1 for black, 0 for white.
Think of a way to measure the direction in which the disc is rotating, using a minimal amount of sensors.