Buttons & Motor Control // Student lesson

Tele-Cal-Intake

Manual Intake · 25% Calibration

Make one button press mean one decision. You will follow a manual intake from OFF to forward, reverse, and back to OFF, then explain what a 25% motor command really means. Keep hands clear of the intake during supervised operation.

Start with a question

A robot checks its controller many times each second. If you hold a button down, how can it tell the difference between one long press and lots of new presses?

By the end, you can…

  • Recognize a new button press by comparing the current input with the previous input.
  • Predict how INIT, readiness, reverse, and stop controls affect the ON latch.
  • Separate requested motor power from the speed and motion you observe.

Before running: Ask your supervisor first. Keep Driver Station STOP ready.

Read · predict · explain

Build the idea, one block at a time

Read these steps before exploring the full program. The numbered blue comments in the diagram link back to the matching step.

01Start with a known OFF state

Actual Blocks for this section
Blocks for Start with a known OFF state
Blocks to notice
  • set Direction
  • set ZeroPowerBehavior
  • set Mode
  • set Power

Setup gives the motor a direction, BRAKE behavior, and RUN_WITHOUT_ENCODER mode, then requests zero power. This mode controls power directly rather than holding a measured speed. The ON latch starts false: think of it as the program's memory of whether forward intake is selected.

For example: Selecting the program prepares its settings. It does not turn the intake ON.

Think first

If the motor is ready but the ON latch is false, should the intake run?

Show Answer

No—readiness allows a request; it does not make one.

02Use INIT to observe, not move

Actual Blocks for this section
Blocks for Use INIT to observe, not move
Blocks to notice
  • opModeInInit
  • get RightStickButton
  • set previousR3
  • set Power

While INIT is active, the program reads R3, remembers its current value, reports readiness, and keeps motor power at zero. Remembering a held button prevents START from mistaking that old press for a new request.

For example: Hold R3 through INIT and START. The intake stays OFF. Release R3, then press it again to make the first new press.

Think first

Does START turn a held R3 into a fresh press?

Show Answer

No. The program already remembers that the button was down.

03Check whether a request can be used

Actual Blocks for this section
Blocks for Check whether a request can be used
Blocks to notice
  • intakeReady
  • if / else
  • logic OR
  • set on

Each control loop checks readiness before choosing power. The motor controller must be ARMED and engaged, and the hub must be open, engaged, and responding. If readiness fails, the program clears ON and requests zero. An SDK health value of UNKNOWN can be normal; an actual fault such as UNHEALTHY or CLOSED blocks operation.

For example: A lost hub connection clears a previous ON selection. Restoring the connection alone does not turn the intake forward again.

Think first

If the other readiness checks pass and SDK health says UNKNOWN, is that word alone a failure?

Show Answer

No—check the actual controller and hub conditions.

04Turn a new press into one toggle

Actual Blocks for this section
Blocks for Turn a new press into one toggle
Blocks to notice
  • get RightStickButton
  • logic AND
  • logic NOT
  • set on

A rising edge means R3 is down now and was not down in the previous loop. Only that change flips the ON latch. Holding the button leaves the latch unchanged; releasing it prepares the program to notice another press.

For example: With readiness true and no reverse or stop input: press R3 → ON; keep holding → still ON; release → still ON; press again → OFF.

Think first

What happens during ten loops with R3 still held?

Show Answer

There is no new edge, so the latch does not flip ten times.

05Let DOWN override forward

Actual Blocks for this section
Blocks for Let DOWN override forward
Blocks to notice
  • get DpadDown
  • if / else
  • set on
  • set power

Holding D-pad DOWN requests −0.25 power and clears the ON latch, provided readiness passes and no stop input is held. Reverse is a hold control, not a toggle. Because it clears ON, releasing DOWN leaves the motor OFF instead of restarting forward.

For example: From ON: hold DOWN → reverse at −0.25; release DOWN → zero; make a fresh R3 press → forward at +0.25.

Think first

Why does DOWN release not return to forward?

Show Answer

The reverse branch has deliberately erased the old ON selection.

06Send a command, not a speed promise

Actual Blocks for this section
Blocks for Send a command, not a speed promise
Blocks to notice
  • set power
  • if on
  • number 0.25
  • set Power

After the decisions, set Power sends the chosen value to the motor: +0.25 for ON, −0.25 for held reverse, or zero for OFF. The magnitude 0.25 is a 25% duty-cycle command. It is not a measurement of 25% RPM or 25% torque: battery voltage, friction, and load also affect motion.

For example: Two trials can both request +0.25 while the intake turns at different speeds because one trial has more load.

Think first

If the requested power stays the same, must the observed speed stay the same?

Show Answer

No. A command and a measurement answer different questions.

07Read the program's decisions

Actual Blocks for this section
Blocks for Read the program's decisions
Blocks to notice
  • telemetry addData
  • intakeStatus
  • telemetry update

Telemetry displays power, the ON latch, raw R3, B, Start, and readiness. Read them together to explain a decision. Raw R3 describes the input; ON describes remembered forward selection; power describes the output request. They are not three names for the same thing.

For example: After you release a successful toggle press, raw R3 can be false while ON is true and power is +0.25.

Think first

What should you look at if a paddle stops the intake?

Show Answer

Check both raw R3 and B: the paddle may be mapped to a different input.

08Clear the request and end safely

Actual Blocks for this section
Blocks for Clear the request and end safely
Blocks to notice
  • get B
  • get Start
  • set Power
  • intakeEnd

B or Start clears ON and requests zero, taking priority over forward and reverse. Releasing those buttons does not restore the old ON selection. Driver Station STOP ends the program; exit cleanup requests zero again and closes the intake session. Zero power is not a guarantee that mechanical motion ends instantly.

For example: While ON, press B → ON becomes false and power becomes zero. To run forward again, release the stop input and make a fresh R3 press while ready.

Think first

Which control should the supervisor use to end the trial rather than just clear ON?

Show Answer

Driver Station STOP.

Try it without a robot

Make the math make sense

new press = R3 now AND NOT R3 previously
Compare two successive inputs. False → true is one event; true → true is a held button.
0.25 × 100 = 25%
This converts the normalized command to a duty-cycle percentage. It does not calculate RPM or torque.
power = +0.25 forward; −0.25 reverse; 0 off
The sign selects the configured direction. The magnitude is the same in forward and reverse.

Use a notebook or talk through your answer with a partner. You do not need a robot to predict what these blocks will do.

1. Paper trace: one press or a held button?

Assume readiness passes and no other control is pressed. Make a table with R3 now, R3 previously, new press, ON, and requested power. Trace: held during INIT and START; release; press; hold for two loops; release; press again. Begin with ON false.

2. Work the command math

Convert +0.25 and −0.25 to duty-cycle magnitudes as percentages. For an imaginary +0.10 command, calculate its percentage and the difference in percentage points from +0.25. Can these numbers tell you the motor's RPM? Explain.

3. Predict an override

Start with ON true. Write the latch and power for: hold DOWN; release DOWN; press R3; press B; release B. Explain why releasing either DOWN or B does not restore an earlier forward selection.

Full commented Blocks program

One source program, in one column. Calls connect any named helper routines; they are not separate programs. Click a numbered blue comment to return to its explanation.

100%

Ask your supervisor before importing or running these Blocks. Viewing the program does not control the robot.

Section in context

Full Blocks program

The highlighted Blocks belong to this section. You can select another blue comment.

Check your understanding

Your turn

Choose an answer, then check your thinking. You can change an answer and try again.

Your answers stay on this page and reset when you reload. No cookies, account, or saved answers.

0 / 6 correct · 0 / 6 answered

0
0
Question 1R3 was released in the previous loop and is down now. With readiness true and no override, what does the program do?

Question 2R3 stays held through INIT and START. How do you make the first forward toggle?

Question 3The intake is ON. You hold DOWN, then release it. With no other input, what happens?

Question 4What does a +0.25 command tell you in RUN_WITHOUT_ENCODER mode?

Question 5Which control should a supervisor use to end the intake program if the mechanism stalls?

Question 6The controller is ARMED and engaged; the hub is open, engaged, and responding. SDK health says UNKNOWN. What does UNKNOWN alone mean?

Reset clears every choice, explanation, and score.

For supervisors: 60-minute teaching plan & robot setup

Before the robot is used

Safety: Use a supported robot with drivetrain wheels clear, an operator, and a supervisor at Driver Station STOP. Keep hands, hair, clothing, and loose objects out of the intake. Stop promptly on a stall; isolate power before clearing or inspecting it. This manual motor test does not sort or count game pieces and has no automatic jam handling. INIT must keep power at zero.

Required hardware & dependencies

  • FTC Control Hub and Expansion Hub module 2, with MOTOR0 configured exactly as intake_motor. Verify the configured module, port, and physical cable.
  • The intake motor and mechanism, secure battery, Driver Station, paired gamepad, and stable support for the robot.
  • Right-stick click (R3), or a paddle explicitly remapped to R3. Verify raw R3 true and B false; do not infer an M1 input or a physical side from the paddle's location.
  • A notebook for requested power, input state, observed motion, and the time between zero command and visible stop.

The ZIP contains required Java / MyBlocks helper sources and assets for an Android Studio Robot Controller project, not an APK or a standalone browser app. A supervisor must build and install the lesson-helper app, configure the hardware, then import the Blocks. These lesson OpModes are disabled by default; enable one only after completing the setup checks.

Robot setup checklist

  1. Before class, download the required helper ZIP and review its INSTALL instructions and the technical manifest linked here. Install its Java/MyBlocks sources and assets in an FTC SDK 12+ Android Studio Robot Controller project, then build and install the lesson-helper app. The ZIP is not a complete APK; uploading Blocks alone does not install the required helpers.
  2. Open the Control Hub FTC Blocks editor and use Upload Op Mode to import IntakeCalibrationBlocks.blk. It is disabled by default. Resolve missing helper blocks and the intake_motor device, then use the editor's Enabled control only after the supervisor checks. Select the intended mode in Driver Station; import does not start it.
  3. Confirm Expansion Hub module 2 MOTOR0, motor direction, BRAKE, and RUN_WITHOUT_ENCODER. Secure the robot and clear the intake before INIT.
  4. During INIT, verify zero power, ARMED/controller engagement, and hub open/engaged/responding. UNKNOWN SDK health alone can be normal; actual UNHEALTHY or CLOSED conditions require correction.
  5. Check R3/paddle, B, and Start telemetry without starting motion. Test the held-through-START release/new-press rule during a short supervised trial.
  6. Keep the default 25% command. Observe OFF, forward toggle, held reverse, release-to-OFF, and B/Start clearing separately. Driver Station STOP ends each trial; isolate power before inspection.

60-minute teaching sequence

  1. 0–8 min

    Discuss the opening question; assign operator, recorder, and STOP supervisor. Identify where hands must stay.

    Look for: Students distinguish a held button from a new press and name Driver Station STOP.

  2. 8–18 min

    Check hardware, helper installation, and input mapping. Read setup and INIT together.

    Look for: Zero INIT power; correct module/port; R3 true without B; students predict held-through-START behavior.

  3. 18–30 min

    Walk through readiness, edge, reverse, and power. Complete the paper trace before a trial.

    Look for: One edge per press; DOWN clears ON; students separate input, memory, and output.

  4. 30–43 min

    With supervisor approval, collect three short supervised observations at 25%. A robot-free group traces the same decisions on paper.

    Look for: Hands clear, STOP access, requested power recorded separately from motion, and no invented measurements.

  5. 43–53 min

    Work the arithmetic practice and self-check quiz; compare notebook observations.

    Look for: 25% is command magnitude, not RPM; students explain a difference between command and physical motion.

  6. 53–60 min

    Return OFF, use STOP, make the mechanism safe, and discuss the exit ticket.

    Look for: A safe stop demonstration or paper stop trace and a correct explanation of reverse release.

Observation notebook

Intake notebook: record the command and what you observe
Trial / controlInputs + readinessLatch / requested powerObserved motion / coast
1 · forward toggleRecord R3, B, Start, and readinessRecord ON and powerRecord direction, interval, and visible stop
2 · hold DOWN / releaseRecord DOWN and readinessRecord latch and both commandsRecord reverse and release behavior
3 · stop controlRecord B/Start or Driver Station STOPRecord zero commandRecord time until motion ends

Also record motor configuration, battery, test interval, and load. Use a separate paper-trace table if no robot is operated. Visual motion is not a calibrated RPM or torque measurement; keep observations and calculations distinct.

Troubleshooting · stop before investigating

Nonzero INIT power or unexpected motion
Use STOP immediately and isolate power. Check the selected mode, wiring, and program before another trial.
Missing helper blocks or device
Keep the mode disabled. Compare the installed helper build with the technical manifest and check intake_motor, Expansion Hub module 2, and MOTOR0.
Readiness is false
Keep OFF. Check ARMED/controller engagement and hub open/engaged/responding. UNKNOWN health alone is not a fault; resolve actual connection or health failures.
Paddle stops instead of toggles
Inspect raw R3 and B in telemetry. Correct the paddle's front-input remap; do not assume its physical side or M1 label specifies R3.
Held R3 does nothing, or DOWN release does not restart forward
Trace the release/new-press rule. DOWN clears ON, so release-to-OFF is intentional. Make a fresh R3 press only after readiness passes and overrides are released.
Stall, heat, or inconsistent motion
Use STOP promptly and isolate power. Inspect mechanism, cable, battery, and load. Do not raise power or rely on automatic jam handling.

Exit ticket & assessment

  1. Show the first allowed ON event when R3 is held through INIT and START.
  2. Explain the latch and power after DOWN is released, and name the control that ends the program.
  3. Convert 0.25 to a percentage and explain why it is not a speed measurement.

Assessment: Look for a correct input/latch/power trace, command-percentage arithmetic, and a safe stop explanation. Use quiz responses as practice feedback, then ask students to explain one answer in their own words. Supervisor approval of the hardware and setup is separate from worksheet performance.

Extension challenge: Design a repeatability study that changes one variable, such as load, while keeping command and observation interval fixed. Add a coast-time column and identify the instrument needed to measure RPM or torque.

Teacher key · discuss after students predict

Held-button trace

Held through INIT/START: OFF/0. Release: OFF/0. New press: ON/+0.25. Both held loops and the next release: still ON/+0.25. Next press: OFF/0. Only a rising edge toggles.

Command arithmetic

Both +0.25 and −0.25 have 25% magnitude; their signs select direction. 0.10 is 10%, which is 15 percentage points below 25%. Neither command supplies an RPM measurement.

Override trace

ON → held DOWN: latch false, −0.25 → release: false, 0 → new R3: true, +0.25 → B: false, 0 → B release: false, 0. B/Start clear the request; Driver Station STOP ends the program.

Readiness and observations

ARMED, engagement, and hub response are operating checks, not speed measurements. UNKNOWN SDK health alone can be normal. Variation at the same command can come from battery, load, friction, or observation method.