From af4c920a8cb7fbc70abb98bb5b80723fdaf80acd Mon Sep 17 00:00:00 2001 From: tillraab Date: Mon, 16 Sep 2019 17:13:56 +0200 Subject: [PATCH] bf --- rasp_grid.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/rasp_grid.py b/rasp_grid.py index 0d105cb..77b3a20 100644 --- a/rasp_grid.py +++ b/rasp_grid.py @@ -200,7 +200,7 @@ def main(): low_channel = 0 high_channel = channels - samples_per_channel = 20000 # * channels = Buffer size + samples_per_channel = rate * 2 # * channels = Buffer size # rate = 20000 scan_options = ScanOption.CONTINUOUS flags = AInScanFlag.DEFAULT @@ -268,10 +268,11 @@ def main(): LED_status[0] = True while GPIO.input(Button1_pin) == GPIO.LOW: sleep(.1) - sleep(2) GPIO.output(LED1_pin, GPIO.LOW) LED_status[0] = False + sleep(2) + LED_t = time() LED_t_interval = 2 @@ -345,6 +346,13 @@ def main(): f.close() temp_f.close() + if LED_status[0] == False: + GPIO.output(LED1_pin, GPIO.HIGH) + if LED_status[1] == False: + GPIO.output(LED2_pin, GPIO.HIGH) + + sleep(2) + if daq_device: # Stop the acquisition if it is still running. if status == ScanStatus.RUNNING: