Q: The circle can rotate clockwise and back. Use minimum hardware to build
a circuit to indicate the direction of rotating.
A: 2 sensors are required to indicate the direction of rotating.
They are placed like at the drawing.
One sensor is connected to the data input of D flip-flop,
and the second one - to the
If the circle rotates the way clock sensor sees the light
first while D input (second sensor) is zero - the output of the flip-flop equals zero,
and if D input sensor "fires" first - the
output of the flip-flop becomes high.