Hi, thanks commenting. I like the idea of re purposing an optical mouse, and re purposing in general.
Thinking about the precision of the experimental result reminded me that the length of the picket fence segment was measured using a ruler to 2 significant figures. I was very casual with the experiments error analysis feeling that a concise treatment was beyond the scope of the post. Indeed, a fair result would be to round the value to 2 SF, hence 9.8 ms^-2, but still adequate. I should have measured each picket segment with calipers and used an average for the calculation then repeated the experiment, etc. Nonetheless, the device and interface work well which was what I was primarily after.
On measuring the height of soap films: the way I was imagining a possible setup of optics and translucent surfaces makes me think of an interferometric approach, perhaps some variant of Newton's Rings and measuring the curvature of a lens. More straightforward, a rig moves a beam transmitting through the film, in the plane of the surfaces height while a receiver monitors intensity. The height of max intensity suggests height of film. Essentially a variant of a travelling microscope where instead of aligning a crosshair, its a beam to demarcate the end point of measurement.