RAIN
Cover of  Foundations of AI and Robotics

Foundations of AI and Robotics

For Senior Secondary Schools, SS1 to SS3

Robots sort parcels, drones survey farms, phones recognise faces and voices, and apps answer questions in English, Yoruba, Hausa and Igbo. Every one of these was designed and built by people who once sat in a classroom like yours. This book is where you start: by the end of SS3 you will have written programs, built circuits, programmed microcontrollers, made a robot that follows a line, connected a sensor to the internet, and trained a machine to recognise patterns in data.

24 chapters in 3 parts, 399 pages. Editor-in-Chief: Olusola Sayeed Ayoola. Published by RAIN, Ibadan, 2026.

Contents

Open a chapter to see its sections. Each chapter ends with a QR code for its free assessment.

1What AI and Robots Are
  • 1.1 Machines that sense, think and act
  • 1.2 What artificial intelligence can and cannot do
  • 1.3 Robots and AI around us in Nigeria
  • 1.4 How engineers work
  • 1.5 Project: spotting AI in your day

Take the Chapter 1 assessment

2Solving Problems with Algorithms
  • 2.1 What an algorithm is
  • 2.2 Flowcharts and pseudocode
  • 2.3 Decisions and repetition
  • 2.4 Searching and sorting by hand
  • 2.5 Project: an algorithm for a school task

Take the Chapter 2 assessment

3Python from the Beginning
  • 3.1 Setting up Python
  • 3.2 Values, variables and types
  • 3.3 Input, output and arithmetic
  • 3.4 Making decisions with if
  • 3.5 Repeating with loops
  • 3.6 Project: a quiz game

Take the Chapter 3 assessment

4Lists, Functions and Files in Python
  • 4.1 Lists and loops over lists
  • 4.2 Writing your own functions
  • 4.3 Dictionaries for records
  • 4.4 Reading and writing files
  • 4.5 Project: a class results manager

Take the Chapter 4 assessment

5Electricity You Can Build With
  • 5.1 Charge, current and voltage
  • 5.2 Resistance and Ohm's law
  • 5.3 Power and energy
  • 5.4 Series and parallel circuits
  • 5.5 Electrical safety
  • 5.6 Project: planning a torch circuit

Take the Chapter 5 assessment

6Circuits on a Breadboard
  • 6.1 Components and their symbols
  • 6.2 Using a breadboard
  • 6.3 LEDs and current-limiting resistors
  • 6.4 Switches and push buttons
  • 6.5 Measuring with a multimeter
  • 6.6 Project: a traffic light circuit

Take the Chapter 6 assessment

7Your First Arduino Programs
  • 7.1 Meet the Arduino
  • 7.2 Blinking an LED
  • 7.3 Reading a button
  • 7.4 Analogue inputs and outputs
  • 7.5 Project: a reaction-time game

Take the Chapter 7 assessment

8Sketching and 3D Design
  • 8.1 Sketching ideas
  • 8.2 Dimensions and scale drawings
  • 8.3 3D design with Tinkercad
  • 8.4 From design to object: 3D printing and laser cutting
  • 8.5 Project: a phone stand

Take the Chapter 8 assessment

9Sensors: How Machines Feel the World
  • 9.1 What a sensor does
  • 9.2 Light and temperature sensors
  • 9.3 Measuring distance with ultrasound
  • 9.4 Calibrating a sensor
  • 9.5 Project: an automatic night light

Take the Chapter 9 assessment

10Motors, Gears and Motion
  • 10.1 DC motors and how they work
  • 10.2 Controlling motors with a driver
  • 10.3 Servo and stepper motors
  • 10.4 Gears, speed and turning force
  • 10.5 Project: a moving flag

Take the Chapter 10 assessment

11Building a Line-Following Robot
  • 11.1 How a line follower works
  • 11.2 Building the chassis
  • 11.3 Wiring the sensors and motors
  • 11.4 Programming the robot
  • 11.5 Testing and improving
  • 11.6 Project: a line-following race

Take the Chapter 11 assessment

12Data, Graphs and Statistics with Python
  • 12.1 Collecting data
  • 12.2 Mean, median, mode and range
  • 12.3 Drawing graphs with Python
  • 12.4 Spreadsheets for experiments
  • 12.5 Project: a weather diary

Take the Chapter 12 assessment

13Coordinates, Angles and Vectors for Robots
  • 13.1 Coordinates on a grid
  • 13.2 Angles and turning
  • 13.3 Distance and direction
  • 13.4 Trigonometry for moving robots
  • 13.5 Project: drawing with a robot

Take the Chapter 13 assessment

14Connected Devices and the Internet of Things
  • 14.1 What the Internet of Things is
  • 14.2 Meet the ESP32
  • 14.3 Sending data over Wi-Fi
  • 14.4 Showing data on a web page
  • 14.5 Project: a school weather station

Take the Chapter 14 assessment

15Batteries, Power and Safe Building
  • 15.1 Types of batteries
  • 15.2 How long will it run?
  • 15.3 Solar power for projects
  • 15.4 Safe workshop habits
  • 15.5 Project: a solar-powered sensor

Take the Chapter 15 assessment

16Ethics, Safety and Privacy for Young Makers
  • 16.1 Technology that helps and harms
  • 16.2 Privacy and personal data
  • 16.3 Fairness and bias
  • 16.4 Staying safe online
  • 16.5 Project: a code of conduct for your club

Take the Chapter 16 assessment

17Learning from Data
  • 17.1 What it means for a machine to learn
  • 17.2 Examples, features and labels
  • 17.3 Training and testing
  • 17.4 Measuring how good a model is
  • 17.5 Project: predicting exam scores

Take the Chapter 17 assessment

18Your First Classifier
  • 18.1 Nearest neighbours by hand
  • 18.2 Nearest neighbours in Python
  • 18.3 Decision trees
  • 18.4 When models make mistakes
  • 18.5 Project: a fruit sorter

Take the Chapter 18 assessment

19Teaching Computers to See
  • 19.1 Images as numbers
  • 19.2 Simple image processing
  • 19.3 Training an image model without code
  • 19.4 Image models in Python
  • 19.5 Project: a plant health checker

Take the Chapter 19 assessment

20Teaching Computers to Listen and Read
  • 20.1 Sound as numbers
  • 20.2 Recognising spoken words
  • 20.3 Words as numbers
  • 20.4 Sorting messages by meaning
  • 20.5 Project: a voice-controlled light

Take the Chapter 20 assessment

21Working with AI Tools Well
  • 21.1 How chatbots work
  • 21.2 Writing good prompts
  • 21.3 Checking what AI tells you
  • 21.4 Using AI honestly in school
  • 21.5 Project: an AI study partner

Take the Chapter 21 assessment

22From Problem to Product
  • 22.1 Finding a real problem
  • 22.2 Designing a solution
  • 22.3 Planning and building
  • 22.4 Testing with real users
  • 22.5 Project: your final project

Take the Chapter 22 assessment

23Presenting Your Work
  • 23.1 Writing a project report
  • 23.2 Making a poster
  • 23.3 Giving a talk and a demonstration
  • 23.4 Science fairs and competitions
  • 23.5 Project: a five-minute pitch

Take the Chapter 23 assessment

24Pathways: University, Careers and RAIN
  • 24.1 Careers in AI and robotics
  • 24.2 University courses that lead there
  • 24.3 Building a portfolio while in school
  • 24.4 The RAIN programmes and certification
  • 24.5 Project: your three-year plan

Take the Chapter 24 assessment

Order a copy

Printed copies are delivered anywhere in Nigeria or collected at RAIN in Ibadan; digital copies arrive by e-mail with your book owner code. We will reply with the price, delivery cost and payment details.

Schools and companies ordering several copies: put the number you need and we will quote.

Other RAIN textbooks

AIML 101 Building and Deploying AI ApplicationsAIML 111 Data Science with PythonAIML 112 Machine Learning IAIML 211 Machine Learning IIAIML 212 Deep LearningRDA 111 Product Design and Development

All the books