Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/pynxc/tutorial_samples/6_subs.py
diff options
context:
space:
mode:
Diffstat (limited to 'pynxc/tutorial_samples/6_subs.py')
-rw-r--r--pynxc/tutorial_samples/6_subs.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/pynxc/tutorial_samples/6_subs.py b/pynxc/tutorial_samples/6_subs.py
new file mode 100644
index 0000000..b35313c
--- /dev/null
+++ b/pynxc/tutorial_samples/6_subs.py
@@ -0,0 +1,13 @@
+def sub_turn_around(pwr):
+ OnRev(OUT_C, pwr); Wait(900)
+ OnFwd(OUT_AC, pwr)
+
+def main():
+ OnFwd(OUT_AC, 75)
+ Wait(1000)
+ sub_turn_around(75)
+ Wait(2000)
+ sub_turn_around(75)
+ Wait(1000)
+ sub_turn_around(75)
+ Off(OUT_AC)