And after I went to all that trouble to make a nice sensor out of it too.
The next experiment was just a phototransistor which initially appeared not to work at all, but changing it from a digital pin to an analog pin seems to have solved the problem. I can definitely pick up the pulse sampling analog in a loop and it’s quite a long pulse too it seems.
So it’s back to the drawing board to build a new sensor out of the phototransistor and then some significant software updates once that is working.
I will post again when I’ve got it working better!