Micro:bit sensor for "scoring goals"? (sensing when 'ball' goes over line)


#1

Hello,
I need to purchase some sensors that can be used in a pretend goal - sensing whether or not a ball or ball like object has passed over a “line”.

Can anyone recommend such a part please?
Ideally I would have one of these devices connected to a micro:bit that could then display a score on the micro:bit, whenever a ball passed over a line (wire/ sensor?) into the net


#2

Something like this maybe, https://shop.pimoroni.com/products/ir-break-beam-sensor-5mm-leds