The numerically controlled oscillator (NCO) aka Direct Digital Synthesizer (DDS) at the heart of this is one of the most elegant things I've encountered. I once used an NCO to adjust for belt speed variation in a machine that applied hot glue to corrugated boxes in a production environment. The CPU I had at the time was constrained to 512 Bytes of EEPROM to store the program in, and it (the NCO) really helped fit tha…
Asking for a friend :-)