Determination detection of direction with 2 optic sensors which are on opposite sides of disc
I think you'll have problems due to non-overlapping pulses which will make it impossible to tell which direction you are running.
To understand why your proposal won't work consider what happens when the wheel stops with a slot in one of the sensors. No matter which way you resume motion - forward or reverse - the output waveforms will be the same.
Normally this is done using quadrature encoder. There are two outputs which are 90° out of phase. (90° = quarter of a turn, hence quadrature.)



simulate this circuit &ndash; Schematic created using CircuitLab
Figure 1. 2-bit rotary encoder waveforms.
The program logic is very simple.

Track the current state of 'A'. If the state changes to 'high' then:
Look at input 'B'. If 'B' is low then count up. If 'B' is high then count down.


Figure 2. A simplifed encoder layout. A and B photo-sensors looking at or through the encoder disc will produce the waveforms of Figure 1. Artwork mine.