From 610448fa734f4598addd99a0cb85f680e3161d49 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Fri, 5 Nov 2021 18:07:18 +0800 Subject: [PATCH] nac3artiq: include parallel in demo --- nac3artiq/demo.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/nac3artiq/demo.py b/nac3artiq/demo.py index 993187b00..27b9d1e89 100644 --- a/nac3artiq/demo.py +++ b/nac3artiq/demo.py @@ -3,17 +3,21 @@ from min_artiq import * @kernel class Demo: core: Core - led: TTLOut + led0: TTLOut + led1: TTLOut def __init__(self): self.core = Core() - self.led = TTLOut(self.core, 19) + self.led0 = TTLOut(self.core, 18) + self.led1 = TTLOut(self.core, 19) @kernel def run_k(self): self.core.reset() while True: - self.led.pulse(100.*ms) + with parallel: + self.led0.pulse(100.*ms) + self.led1.pulse(100.*ms) self.core.delay(100.*ms) def run(self):