Nice - even if I scrolled pretty quickly through parts [no smiley face - they’re dangerous]. I will come back and spend more time on it. Ummm. When/if I get an oscilloscope.
“Oscilloscope” apps are available Android smartphones, and I believe for iPhones (provided they have a 3.5mm jack).
They are intended for analysis of audio input through the 3.5mm jack, and presumably are limited to audio frequencies (by software? by hardware?), but they do some clever o-scope stuff, and could do much of what you show, within the supported frequency range.
It has seemed to me that putting a photodiode pointing out the cord hole of a 3.5mm stereo plug, sort of a poor-man’s version of Ftlab/Smartlab’s series of Smart XX Checkers, and with the appropriate app, PWM clocking for the masses. And then I come to the never-get-around-to-it phase.
So since you actually seem to get things done, I thought maybe I’d pass the idea on to you to figure out the details and best options.
Looking at audio-frequency PWM might provide all the play-value I need, or it might turn out to be the entry-level drug toward getting a real oscilloscope. I’ve wanted an o-scope on and off for decades, but never quite built a business case while I was still working, and never quite built a play-value case then or now.