Total rewrite, nerfgadget now has dynamic threshold level, and uses continuous analog sampling.