My First Day with Raspberry Pi!

6 Jan

Today, my uncle gave me a raspberry pi.  I’m so excited!  I’ve used a Lego Mindstorms and have coded a little bit in python and HTML.  My uncle is a software engineer and gave me some quick lessons.  One thing he told me is to practice using the raspberry pi through the linux command prompt by typing in commands and typing programs using an editor called “vi”.  He said that all of the software engineers at his company use vi and that it’s one of the first questions they ask in an interview, “Do you know how to use vi?”

He also told me about something important in programming through the raspberry pi called “permissions.”  As a user, I don’t have permission to access certain things like the pins on the raspbpi (short for raspberry pi).  So, if I write a program to light up an LED, I’ll get an error that I don’t have permission to do that.  So, I have to use a command called “sudo”.  “sudo” has permission to run everything.  So, if instead of typing “./program” the normal way to run a program, I have to type “sudo ./program”.  But I have to be careful with this because sudo has a lot of power.  So, every time I run something through sudo, it asks me for my password to remind me that I’m doing something that could be dangerous.

He showed me how to open vi simply by typing “vi” at the unix command prompt.  I later learned that there are two modes in vi, command mode and insert mode.  Command mode is for doing things like saving a file and quitting vi.  All of the commands begin with a colon.  If I want to save a file, I type “:w” or if I want to quit vi, I type “:q” or if I want to quit without saving, I type “:q!”.  If I want to “save as” I type “:w newfilename”.   These are all of the commands I’ve needed so far.   To get into insert mode, I just hit the “i” button.  Now, I can type programs.  My uncle set up Unix so that I can program in python, java, or c++.  My dad and I have read a little bit about python already so I chose that one.  After typing a program (“Hello World!” of course), I hit escape to go back to command mode to save and quit vi.

Now that I’m back in Unix, I can try to run my program.  Because I’m programming in python, I just type “python”.  This is only if I saved the file as “”.  If I did anything wrong, there will be an error message and it will show me exactly where the mistake is.  Then I have to go back into vi and fix it.

I learned some other interesting things about Unix from my uncle.  If I want to change directories (folders in windows or mac), I type in “cd foldername”.  If I want to see what is in a directory, I type “ls” (that’s lowercase L and S).  There is a color code that tells me if I’m looking at a directory, a file, or a program.  Also, if I don’t want to retype a command over and over, I can use the up arrow to go back to a command that I’ve typed recently.  Or, I can type “history” and see the last 100 or more instructions that I’ve typed in Unix.  That’s very helpful because I couldn’t remember some of the things that my uncle typed and I could just see the history and copy it.

He also showed me that I can connect the raspbpi to the TV or I can connect to it from my laptop using SSH.  My dad helped me set it up using a program called PuTTY that is free online.  He looked up a number called the IP address and we just type it in and connect.  Then I can type on the laptop from anywhere in the house.  When connected to the TV, I use a wireless mouse and keyboard.  The raspbpi also connects to the internet.

If you don’t know what a Raspberry Pi is, watch this video   or visit


6 Responses to “My First Day with Raspberry Pi!”

  1. Hello there! I simply want to give you a big thumbs up for your great information you’ve got right here on this post. I will be returning to your web site for more soon.

  2. alpha graphics January 10, 2013 at 5:31 am #

    Quality content is the key to interest the viewers to visit the web page, that’s what this web site is providing.

  3. January 10, 2013 at 6:47 am #

    I actually enjoy the creation of your website, are you the owner?

    • krystal92586 January 11, 2013 at 5:44 am #

      I’m not sure what you mean by owner. I write everything myself. Someone else created the picture in the background, I found it on google images and wordpress did the page design.

  4. diedud January 27, 2013 at 3:20 pm #

    How lucky are you, I’m 13 and I wanna learn programing and how I long for a Raspberry PI, I know I can learn programing other ways butIi love the idea of a having my own Raspberry PI.

    • krystal92586 January 28, 2013 at 11:51 pm #

      You’d probably love it as much as me. Yes, you can download the Python compiler and program on a Windows computer. You can also download “Scratch” and learn programming by dragging and dropping things just like programming the Lego robot. Good luck to you!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: