Sunday, July 24, 2016

Enter Raspberry PI

Previous | Home | Next

Children have truly inquisitive minds. My Mom tells me that when I was young, I had beeb asking a million questions a day. Children tend to do that. It is not easy to provide kids with answers that will be interesting to inspire them. But let's give it a shot, shall we?

Ask away!

What's the difference between toaster and Raspberry PI?
Unlike a toaster, Raspberry PI can do more than one thing It's because Raspberry PI is a computer.

What do computers do?
Computers run computer programs.

What is a computer program?
It is a recipe which computer carries out step by step. Instructions are understood by computer (you must use a programming language). It is by no means different from giving instructions to a person. For instance:
  1. Sit comfortably on the couch.
  2. Turn on TV
  3. Grab the black controller.
  4. If in your hands: press this button. Otherwise you must have dropped it, then pick it up and press this button.
  5. Move cursor to this menu.
  6. Click.
  7. Play
  8. Turn off PlayStation.
  9. Turn off TV.
  10. Put controller back on the shelf.  
  11. Repeat tomorrow. 
 Writing computer program is similar to this.

How do I write a computer program?
Just like English or any other language is used to communicate with other people, you can use programming language to tell computer what to do. It has rules that you need to learn. We will run it in the text editor and execute (execute = tell the computer to run it).

Which programming language are we going to use?
We are going to use Python. Google engineers use it, NASA uses it. It's really cool and powerful.

Look at the Raspberry PI desktop now. This is what you are going to use. You can access Python interpreter clicking Menu/Programming/Python2 (idle) or Python3 (idle). This opens Python interpreter. You can use it to type commands and accepting them with Enter. We will do that shortly.

Or you can click terminal window on a tool bar and type python (or python3). I will show you that later.

What's Python interpreter?
It is a program that translates your program into language understood by your computer (called machine language).

Ready for the ride?

Let's write our first program (go next).  

Previous | Home | Next