[ we make science jokes, periodically ]

Robotics vs. Coding

STEAM is taking off. There are a lot of words floating around, and what they are might not be so obvious. Let's get into the ins and outs of robotics and coding.

Robotics involves building something. It might be a car, or it might be an arm. A robot will do something, maybe it can drive itself through a maze, or perhaps it can stack dominoes. When you build a robot, you take various pieces and put them together to make them all work as a whole. You'll probably need wheels, a body, and a motor for a car. For our robotic arm, you'll need to build the various joints and things called servos to move those joints. Just like people have hearing and sight, you can use sensors to give a robot vision.

Now this is the point where coding comes in. Let's use a robotic car as an example. It can move forward, backward, left, and right. It also has sensors that can tell if it is over a line. Following a line on the ground will take us out of the maze.

Our code for this project will do the thinking for our car.

It might be something like this:

Move forward until the line turns.
Which way did the line go?
Turn that way and move forward again.
Repeat step 1

Without this thought, our car might just turn on and go forward, bumping into the maze's walls.

In our robotic car, the coding made our car do what we wanted.

But coding isn't just for robots. The computer or phone you are reading this on was built with coding. Your favorite website is put together with code. Your favorite game is created with code. So coding is like telling a computer how to think and make decisions. A simple but also useful program might be to make a calculator.

It might work like this:

Ask for two numbers
Ask if you want to add, subtract, multiply, or divide
Do the calculation
Show the result
Go back to step 1

That was a dull example; maybe you have an idea for a game. You'll need lots of code for a game, but let's pick one small part.

Did your superhero get to the end of the level? That might look like this:

1. Every time our hero moves forward:
a. check to see if they made it past the finish line
i. Win!

So coding is needed for robotics, you can do some things, but to make it really cool, you'll need coding. Coding is also used for making your own games and programs as well.

The main difference is that with robots, you are making a robot with code, and with just coding, you are making something that exists inside of a computer. One isn't better than the other; in fact, they are using the same sets of skills. The most significant difference is that you can see and touch robotics. You get the see how the code works right in front of you. With coding, what you do is on a screen. Some kids do better with robotics because it is a bit more real to them. Some want to make a game, so ultimately, it depends on their interests and what motivates them the most to learn.