From 7e9f6f1c3cb4215f867edb5b0e30f43687c976dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Hru=C5=A1ka?= Date: Mon, 23 Apr 2018 23:04:03 +0200 Subject: [PATCH] lightnings demo improv --- demo_adc_lightnings.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/demo_adc_lightnings.py b/demo_adc_lightnings.py index 58a2f51..54fbb4d 100644 --- a/demo_adc_lightnings.py +++ b/demo_adc_lightnings.py @@ -12,6 +12,8 @@ from scipy.io import wavfile # | # '-> 10k -> GND +led = None + def capture(tr): now=datetime.datetime.now() now.isoformat() @@ -19,16 +21,20 @@ def capture(tr): print("Capture! ") print(data) np.save("lightning-%s"%now.isoformat(), data) + led.pulse_ms(250, confirm=False) with gex.Client(gex.TrxRawUSB()) as client: adc = gex.ADC(client, 'adc') + led = gex.DOut(client, 'led') + + adc.set_sample_rate(60000) adc.on_trigger(capture) adc.setup_trigger(1, - level=500, - count=1000, + level=2600, + count=5000, edge='rising', - pretrigger=250, + pretrigger=500, holdoff=500, auto=True)