The ramp is 3D printed with the tracks. Each track has three light dependent resistors that act as photo sensors. The potentiometer calibrates the demonstration to room light conditions. The small OLED display reports the timing for each photo-resistor. The circuitry and display interface with a Raspberry pi Pico 2040 micro-controller.
The ramp below interacts with the circuit above. Each light dependent resistor latches when the cylinder rolls over it.