UCSB Science Line
Sponge Spicules Nerve Cells Galaxy Abalone Shell Nickel Succinate X-ray Lens Lupine
UCSB Science Line
Home
How it Works
Ask a Question
Search Topics
Webcasts
Our Scientists
Science Links
Contact Information
How do I Program Robots?
Question Date: 2016-09-13
Answer 1:

Robots are composed of mechanical parts, like wheels and motors and junctions that slide or rotate. But they also have a lot if electrical and electronic parts, like infrared sensors, cameras, timers, and electronics that power the mechanical motors. So, you need to program them to interact so that each part moves only when triggered and for a specified time, or until the trigger is removed.

So, how do we program them? To program them, means we need to program each little device in them. Also, we need to write a program to make each of these individually functional devices interact. In the old analog days, one would have programmed them by sending pulses of high and low voltage. Nowadays, the circuits are "integrated", meaning they are printed on a little board which comes out of the factory pre-programmed and makes our life easy.

So, now, all we need to do is write the program to make the parts interact. We write this the same way we would talk to a robot: we use commands like "turn left", "take 10 steps", "move forward with this speed". And we literally write the sequence of commands in a piece of blank document, but in a language that the computer understands. This is called a "programming language". Like human languages, there are many programming languages. The most powerful is C, but is complicated. There are others, essier to learn.

If you want to try one out, Lego makes great robotic kits that you can program.


Click Here to return to the search form.

University of California, Santa Barbara Materials Research Laboratory National Science Foundation
This program is co-sponsored by the National Science Foundation and UCSB School-University Partnerships
Copyright © 2020 The Regents of the University of California,
All Rights Reserved.
UCSB Terms of Use