from input_detect import ThresholdDetect
ipdt = ThresholdDetect()
ipdt.init(channels=1)
ipdt.start_recording()
ipdt.calculate_threshold(30, data_len=40000, trial_num=2)
Progress: trial 2 of 2 (100.0%)
446.54999999999995
while ipdt.detect_signal(447):
pass
print('Signal detected.')
Signal detected.
ipdt.terminate_recording()