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: 17

Grade code: 1.3.3.LI.3

Strand code: 3

Sub-strand code: 3

Content standard code: 1.3.3.CS.1

Indicator code: 1.3.3.LI.3

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

Welcome, future engineers and innovators! Today, we are moving from building robots to giving them a "brain." A robot without a program is just a collection of metal and wires. The program is the set of instructions that tells it what to do, how to react, and when to stop. In Ghana, we see processes that repeat every day. Think of a traffic light system at the Tetteh Quarshie Interchange; it cycles through red, yellow, and green in a loop. Or an automated irrigation system on a farm near Akosombo, which checks the soil moisture and waters the plants repeatedly. We are going to learn how to write programs for robots that can perform such repetitive tasks.

Lesson notes

This lesson builds on our basic knowledge of programming. Let's dive into the key ideas needed to make our robots perform complex, repetitive tasks. A. Quick Recap: Flowcharts & Basic Arduino Structure Flowchart: A diagram that represents the step-by-step logic of a program. Key symbols we will use are: Oval (Terminator): Start/End Rectangle (Process): An action, e.g., "Move Forward" Diamond (Decision): A question with a Yes/No answer, e.g., "Is distance Sense -> Decide" cycle is a feedback loop.

In programming, the most common way to create this is with a `while` loop.

Syntax of a `while` loop:

```cpp while (condition_is_true) { // Keep doing this code... // ...and this... // ...as long as the condition remains true. } // When the condition becomes false, the program continues from here. ```

Evaluation guide