Unit 5: Logic & Decisions
Use conditions and comparisons to handle button checks, mechanism limits, and multi-sensor automation safely.
6Lessons
0Completed
Not StartedCurrent Status
Lesson Roadmap
5.1 · if StatementsLesson 5.1: Using if Statements to Decide When a Motor Should RunOpen5.2 · else if ChainingLesson 5.2: Using else if Chains to Pick One Robot Action at a TimeOpen5.3 · Comparison OperatorsLesson 5.3: Using Comparison Operators to Protect Hardware LimitsOpen5.4 · Logical OperatorsLesson 5.4: Combining Sensor Checks with AND and OR LogicOpen5.5 · Intake LogicLesson 5.5: Build Intake Logic for Multi-Stage Game Piece SortingOpenUnit 5 · Coding ChallengeUnit 5 Comprehensive Coding Challenge: Safe Intake Decision TreeOpen
What This Unit Covers
Use if/else if/else chains to guarantee a single unambiguous command reaches hardware each loop cycle.
Implement comparison operators to create soft-limit safety zones that prevent motors from exceeding physical bounds.
Combine multiple sensor thresholds with logical AND/OR operators for robust, driver-verified hardware actions.
Review the sequence and goals here, then resume at your first incomplete lesson.
Already know this unit?
Complete the comprehensive coding challenge to prove every unit objective and jump directly to Unit 6: Loops & Iteration.
Stuck on this lesson?
Ask about anything on this page. It can see which lesson you have open and which part you are reading.