Skip to content

Getting Started

Elizabeth Adams edited this page Apr 8, 2019 · 7 revisions

We’ve already put most of the code together, but you'll need you to make a few adjustments along the way. There is lots of opportunities for expanding on what we've done, too.

To retrieve all of the things we’ve prepared for you, you’ll need to clone the repository from GitHub. GitHub is an awesome service that allows us to store, revise, and manage projects like this.

You will want to run this script on a dedicated device. You can use a laptop, Raspberry Pi, or other single board computer.

To clone the repository all we need to do is go into our computer's or Pi’s terminal, and type this command:

$ git clone https://github.com/InitialState/airvisual.git

Hit enter and you’ll see this information:

$ git clone https://github.com/InitialState/airvisual.git
Cloning into 'airvisual'...
remote: Enumerating objects: 13, done.
remote: Counting objects: 100% (13/13), done.
remote: Compressing objects: 100% (12/12), done.
remote: Total 13 (delta 2), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (13/13), done.

Once you see this then congrats, you’ve successfully cloned the GitHub Repo and have all of the necessary files to build this project.

Let’s move into the new directory. To change directory’s, all you need to do is type “cd” and then type the name of the directory that you wish to go to. In this case, we’ll type

 $ cd airvisual

Once we hit enter, you’ll see that we’re now in the airvisual directory.

Let’s type ls to see what files we’ve installed on our pi.

 LICENSE   README.md   airquality.py

Here we see the we’ve got our readme document and python files. Let’s take a look at airquality.py. We’re going to use the nano command to open the text editor.

Go ahead and type:

 $ nano airquality.py

Here you can see all of the code we’ve prepared for you for this project. We’re not going to make any changes to this document just yet, but feel free to scroll around and see what we’re going to be doing later in this tutorial.

<< Introduction - Part 1: How to Use the AirVisual API >>

Clone this wiki locally