Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/pynxc/tutorial_samples/12_wait.py
diff options
context:
space:
mode:
Diffstat (limited to 'pynxc/tutorial_samples/12_wait.py')
-rw-r--r--pynxc/tutorial_samples/12_wait.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/pynxc/tutorial_samples/12_wait.py b/pynxc/tutorial_samples/12_wait.py
new file mode 100644
index 0000000..87b9b6f
--- /dev/null
+++ b/pynxc/tutorial_samples/12_wait.py
@@ -0,0 +1,12 @@
+def main():
+
+ SetSensor(IN_1,SENSOR_TOUCH)
+ t3 = CurrentTick()
+ OnFwd(OUT_AC, 75)
+
+ while (SENSOR_1 != 1) and ((CurrentTick()-t3) <= 1000):
+ pass
+
+ Off(OUT_AC);
+
+