This is a tkinter button press. So GUI, a simple Stop button to end the loop. Here is the exact code I am working with.
def callback(): while True: ADC_Value = adc.read_adc_difference(0,gain = GAIN) print(ADC_Value, "ADC Value") sleep(2) x_Input = (((ADC_Value-68)*(1/8002.0))*(1/2.4))-0.25 print(x_Input, "Current Pressure") t = threading.Thread(target = callback) t.start()This would probably solve itself if I could find the tkinter library in my directory.