diff options
Diffstat (limited to 'pynxc/tutorial_samples/3_spiral.py')
-rw-r--r-- | pynxc/tutorial_samples/3_spiral.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/pynxc/tutorial_samples/3_spiral.py b/pynxc/tutorial_samples/3_spiral.py new file mode 100644 index 0000000..90f9f5e --- /dev/null +++ b/pynxc/tutorial_samples/3_spiral.py @@ -0,0 +1,14 @@ +DEFINE TURN_TIME=360 + +def main(): + + move_time = 200 # set the initial value + for repeat in range(50): + + OnFwd(OUT_AC, 75) + Wait(move_time) # use the variable for sleeping + OnRev(OUT_C, 75) + Wait(TURN_TIME) + move_time += 200 # increase the variable + + Off(OUT_AC) |