Sometimes, the analog value returned by the ADC may spike at a sample given a relatively large number of samples causing the emergency stop sequence to trigger.
To accommodate this, the threshold value is currently set to a high value and it works but is not ideal.
Need a better way to discount this spike from triggering the threshold and emergency stop sequence.