Tested on robot machine with kinect. It works. May want to put in a delay before we start calculating frequency as it seems it takes some time to get going at a good framerate. Then maybe check to see if it has a few bad ones in a row, maybe like a full minute of freqs below 25Hz or something before shutting down.