ADM Activity 2.1.4

Sensor-Based Decision Logic

Use calibrated sensor data with conditional logic so the workcell can choose an action and respond safely when a reading is unexpected.

Your lesson guide

Objective

Work toward the lesson goal: Sensor-Based Decision Logic. Use the directions and success criteria in the activity below.

Materials

For the online work: a browser and your engineering notebook. Follow the activity’s materials list for any physical build, and get teacher approval before using equipment.

Plan your time

Suggested work block: 45–60 minutes. Physical builds and projects may span several classes; follow your teacher’s schedule.

Enable JavaScript to use this investigation. The lesson directions and report fields remain available below.

Learning Targets

By the end of this lesson

  • Use sensor values inside if / elif / else decision structures.
  • Assign different automated behaviors to different product types.
  • Create a fail-safe response for unexpected sensor data.
  • Debug decision logic using live sensor readings.
Equipment & Systems

What you will use

  • VEX CTE Workcell
  • Optical Sensor
  • Signal Tower
  • Red and green Disks
Student Workflow

What You Will Do

  1. Start with the validated color ranges from Activity 2.1.3.
  2. Create pseudocode or a flowchart that shows the decision path for each expected color.
  3. Program the required behaviors using if / elif / else.
  4. Add an else condition that handles any reading outside the expected ranges with a safe response.
  5. Test with valid products and an unexpected input, then revise the program until its behavior is repeatable.
Programming Focus

How coding supports the lesson

Use the variables, loops, and if / elif / else structures learned in Unit 1. The new skill is applying them to live manufacturing data and designing robust failure behavior.

What You Will Submit

What You Submit

  • Decision flowchart or pseudocode
  • Final commented sensor-decision program
  • Test results for each expected product
  • Evidence of the programmed response to an unexpected reading

Build your lesson report

Checkpoint: is your evidence ready?
  • Check calculations, units, labels, and measurements against the activity requirements.
  • Record what actually happened, including unexpected results.
  • Explain what you changed and why; attach required drawings, photos, CAD, or code in your classroom assignment.

Decision flowchart or pseudocode Final commented sensor-decision program Test results for each expected product

A PDF download is not a submission. Review it, then upload it and any required attachments through your classroom assignment system.