ADM Project 1.1.8

Decreasing Spirals

Use loops and incremental movement to create a decreasing spiral path.

Lesson Overview

In this project, you will apply movement coding, path control, and geometric reasoning to create a programmed robotic motion project using decreasing spiral paths. The example uses a loop and a side length variable to control repeated movement.

Notes

  • This example intentionally shows why variable names and debugging matter.
  • Check the spelling and capitalization of variables before running code.
  • A loop can reduce repeated commands, but each step still needs to be planned.
  • Incremental movement changes position relative to the robot's current location.
  • Final submissions must include comments explaining the purpose of the loop and major movement sections.
Code example

1.1.8: Decreasing Spirals

Review the code, copy it when needed, and add comments before submitting your final version.

VEXcode Python Example
Code examples may be incomplete or missing comments. Comments are required for code submissions.
def main():
    arm.move_to(100, 65, 0)
    sideLength = 90
     #iterate through loop, reduce loops by 15mm each iteration   
    for i in range (2):
        arm.move_inc(sideLength, 0, 0)
        arm.move_inc(0, sideLength, 0)
        sideLength = sideLenth - 15

        arm.move_inc(-sideLength, 0, 0)
        arm.move_inc(0, -sideLength, 0)
        sideLength = sideLenth - 15

        arm.move_inc(-sideLength, 0, 0)
        arm.move_to(120, 0, 100)