Getting to know Ubuntu

PR0 Challenge 5.2 [20pts]


This joke from is nerd-famous... you will get it very soon.

This joke from is nerd-famous… you will get it eventually.

Congratulations, you are now in Ubuntu Linux! This is the preferred operating system of all Hackers. It is open source and completely hackable. That means you can change anything you want in it, you can even make your own version of it. It doesn’t belong to anyone and it doesn’t cost any money.

Now, you know what they say about a free lunch right? There’s no such thing. Ubuntu might be a hacker’s paradise, but its not easy to use…

In the next challenge, we’re going to start hacking some open source hardware called Ardiuno. If you have not completed Challenge 0.6 Open Source Hardware (10/5 HW), you might want to do that first so you know what this is all about.

STEP 1: Locate the terminal emulator

In Ubuntu Linux, locate the terminal emulator in the application panel. Open it.

The terminal display should look familiar to you. It's just like the Chrosh window from when you were installing Crouton.

STEP 2: Install Software

We will now use the Advanced Package Tool or apt to locate, download and install the Arduino Integrated Development Environment IDE software from the Ubuntu repository server (e.g. on the internet) and install the package arduino on our machines!

To do this, inside of the Ubuntu terminal window, type:

sudo apt-get install gcc-avr avr-libc openjdk-6-jre arduino git

... then press enter!

In this step, you are instructing the apt program to download the gcc-ave, ave-libc, openjdk-6-jre, arduino and git programs from the Ubuntu repository. Then you're also instructing it to install those programs on your computer… which should be happening right now on your screen. These are all very important programs for open hardware hacking!

The first two: gcc-ave and ave-libc are called “compilers” and they do important work in translating the human readable code that you type with words and symbols into the stuff machines can understand – the 0’s and 1’s.

The next one, openjdk-6-jre, is a special program that helps to process graphics, which will be important for the one after it: arduino. This is the program we will use to talk to the Arduino. The last program, git is a special one that we will use to share and save our work. Think of it as Google Docs for hackers… we’ll make more sense of that later.

Finally, the command sudo stands for “superuser do”. Every user on a computer has permission to change their own files. Some users have permission to change their files and other people’s files (like a system administrator… the computer guy at work or school). For example, sometimes your parents will put locks on your computer to prevent you from using it in ways they don’t like. They are special users.

A superuser has permission to do anything and can make the computer do anything! Now do you get the cartoon?

Is the software done installing? When it is…

  1. go to the terminal window and type arduino;
  2. There will be an error message saying something about dialout, hit ignore!

A new window should open. It should look like this:


STEP 3: Changing Permissions and Stuff

OK, you’re almost ready to connect up the Arduino hardware board and get hacking, just one more step...

The sudo command doesn’t really make you the superuser, it just lets you pretend to be the superuser when you type and only when you type it. You have to type it every single time you want to *force* the computer to do something. You don’t want to always be forcing the computer cause you’ll be busy doing other stuff. So we’re going to change some of your permissions for good.

First, your computer talks to the Arduino board using the USB, which stands for Universal Serial Bus. It’s a certain type of connector that uses Serial communications! Serial communications are A LOT like telephones and your computer will want to dialout to the Arduino (thats why you got that error message). We have to make sure that you have permission to dialout by adding your username to the dialout files.

In the terminal window, type:

sudo usermod -a -G dialout stemscholar

Good, now you can dialout… to continue with this challenge, you will now need to get:

  • An Arduino UNO board;
  • A USB cable;

Plug the square end of the USB into the Arduino board and the flat rectangular end of it into the USB port on your Chromebook.

The next step is to open up the "phone lines". The USB plugs into a port and each port on your computer has a special code. The USB port is called ttyACM0 (thats a zero at the end!). We’re gonna give you permission to talk through this port.

In the terminal window, type:

sudo chmod a+rw /dev/ttyACM0

This is telling the computer to “change mode” chmod for a-all (everyone) to be able to r-read and w-write on the “device” /dev connected to the /ttyACM0 port!

Alright! You now have permission to dialout to the Arduino on the USB port ttyACM0.