Lesson Notes By Weeks and Term v4 - SHS 1

Programming Robots

Download the Lessonotes Mobile Ghana app for faster lesson access on Android and iPhone.

Subject: Robotics

Class: SHS 1

Term: 2nd Term

Week: 19

Grade code: 1.3.3.LI.2

Strand code: 3

Sub-strand code: 3

Content standard code: 1.3.3.CS.1

Indicator code: 1.3.3.LI.2

Theme: Robot Construction & Programming

Subtheme: Programming Robots

Lesson Video

This page supports the lesson note with a companion video and a short classroom-ready summary.

For class groups and homework, share this lesson page so learners also get the summary, objectives, and full lesson context.

Performance objectives

Lesson summary

This lesson focuses on a crucial skill in robotics: teaching a robot how to make complex decisions. Simple decisions like "if it's dark, turn on a light" are useful, but real-world problems require more thinking. For example, a farming robot might need to decide, "IF the soil is dry, AND it is nighttime (to reduce evaporation), THEN I should water the plants." This is a nested decision—a decision within another decision. In Ghana, this skill is vital for creating local solutions in agriculture (automated irrigation), security (smarter security systems), and even in managing our homes (energy-saving appliances).

Lesson notes

A. Recap: Simple Decisions (if-else)

Remember that a robot makes decisions using `IF-THEN-ELSE` logic. IF a certain condition is true, THEN do a specific action. ELSE (if the condition is false), do a different action.

Flowchart Symbol Recap: Oval (Terminator): Start / End Parallelogram (Input/Output): Read sensor data / Display message Rectangle (Process): Perform an action (e.g., Turn motor ON) Diamond (Decision): Ask a Yes/No question

Example: A simple light-sensitive robot. Flowchart: ``` (START) --> [Read Light Sensor Value] --> --(Yes)--> [Turn LED ON] --> (END) | (No) | v [Turn LED OFF] --> (END) ``` Pseudocode: ``` START READ light_level IF light_level B{Read Soil Moisture Sensor}; B --> C{Is Moisture G(Do Nothing); C -- Yes --> D{Read Time of Day}; D --> E{Is it Nighttime?}; E -- Yes --> F[Activate Water Pump for 10s]; E -- No --> G; F --> H(End); G --> H; ``` Analysis: Notice how the diamond `Is it Nighttime?` can only be reached if the answer to `Is Moisture B{Read Motion Sensor}; B --> C{Is Motion Detected?}; C -- No --> G(Light Remains OFF); C -- Yes --> D{Read Light Sensor}; D --> E{Is it Dark?}; E -- Yes --> F[Turn Security Light ON]; E -- No --> G; F --> H(End); G --> H; ``` Task: Write the Python/pseudocode for this flowchart.

Evaluation guide