Skip to main content

Stage 5: Arrays and Non-Blocking Timing

This stage keeps CompetitionTeleOp.java and improves it in place. Use the existing project files and earlier snapshots as references; no disposable autonomous file is created.

Your Task

Reduce repeated motor work and prepare a responsive launch sequence:

  1. Put the four drive motors in an array.
  2. Use a counted or for-each loop for repeated configuration or shutdown.
  3. Detect the rising edge of the A button.
  4. Store a deadline based on getRuntime() and advance the launch state from later loop() calls.
  5. Keep stop() responsible for safe shutdown.

Do not use sleep() or while(true). The program must stay responsive to Stop.

Coding Challenge Simulator

Telemark Unit 6 Comprehensive Coding Challenge
The editor opens your saved cumulative DECODE project and adds only the files introduced by this stage.
Use Init and Start to check every unit objective. Passing every check demonstrates full unit mastery.
Complete the stage across its file tabs. The requirement panel checks the compiled project, and a passing stage saves a read-only snapshot.

Passed every challenge check?

Mark the unit mastered to record every lesson objective and continue directly to the next unit. Your progress will be saved in this browser.

Stuck on this lesson?

Ask about anything on this page. It can see which lesson you have open and which part you are reading.