Skip to content

Getting Started

Elizabeth Adams edited this page Sep 4, 2019 · 8 revisions

We’ve already put in a lot of the leg work for you putting the code together and organizing the information. We’ll just need you to make a few adjustments along the way.

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. A Raspberry Pi is a perfect device to run applications like this tutorial.

To clone the repository all we need to do is go into our Pi’s terminal, or your computers terminal that’s SSH’d into your pi and type this command:

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

Hit enter and you’ll see this information:

pi@raspberrypi ~ $ git clone https://github.com/InitialState/darksky.git
Cloning into 'darksky'...
remote: Counting objects: 2, done.
remote: Total 2 (delta 0), reused 0 (delta 0), pack-reused 2
Unpacking objects: 100% (2/2), done.
Checking connectivity... 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.

Before we move onto the next step, let’s take some time to explore around this directory and learn a few basic command line commands.

Type in the command below into your terminal:

 $ ls

This command lists everything that’s available in the directory that you’re currently in. This list shows that our Github Repo has been successfully cloned into our directory under the name “darksky.”

Let’s take a look at what’s in that 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 darksky

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

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

 README.md  darksky.py ...

Here we see the we’ve got our readme document and python files. Let’s take a look at darksky.py. Instead of jumping into the file with the cd command like we did for directory’s, we’re going to use the nano command. The nano command allows us to open up the nano text editor where we have all of our python code for each segment of this project.

Go ahead and type

 $ nano darksky.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 - Dark Sky API >>

Clone this wiki locally