Skip main navigation

Robot program

How does a robot follow commands? Or how does a robot obey instructions? In this article, Professor Richard Mitchell explains more.
Robot arm writing a report with a pen
© University of Reading

Suppose a robot has a computer. Then that computer will have a series of instructions which it will obey. Ultimately those instructions are a series of electronic signals which computers but not humans, understand.

Instead we can describe what the program should do in a language more like English.

For instance, suppose we want the robot to continually explore its environment without bumping into obstacles, where it has sensors for detecting if there is an obstacle on the left or the right. This could be achieved by the robot repeatedly obeying the following:

  • Read Information From Sensors
  • IF neither sensor sees an obstacle Go Forward
  • IF left sensor only sees an obstacle Turn to the Right
  • IF right sensor only sees an obstacle Turn to the Left
  • IF both sensors see an obstacle Go Back

This leads us to the first exercise for the week. Here there is a robot in an environment with sensors which detect objects or walls on the left and the right. Your task is to determine what the motor speeds should be to Go Forward, Turn to the Right, etc….

© University of Reading
This article is from the free online

Begin Robotics

Created by
FutureLearn - Learning For Life

Our purpose is to transform access to education.

We offer a diverse selection of courses from leading universities and cultural institutions from around the world. These are delivered one step at a time, and are accessible on mobile, tablet and desktop, so you can fit learning around your life.

We believe learning should be an enjoyable, social experience, so our courses offer the opportunity to discuss what you’re learning with others as you go, helping you make fresh discoveries and form new ideas.
You can unlock new opportunities with unlimited access to hundreds of online short courses for a year by subscribing to our Unlimited package. Build your knowledge with top universities and organisations.

Learn more about how FutureLearn is transforming access to education