This is a quick tutorial on how to use github to “clone” our github repositories.
The easiest way to get our set of drivers and examples for the BrickPi is to use github. With a few quick commands, github will automatically place our code on your Raspberry Pi.
First, check that Github is up to date on your Raspberry Pi.
This command will check for the latest version, and if you don’t have git on your RPi, it will install it.
Next, we’ll create a clone of one of the Dexter Industries repositories. You can see the full list of the repositories on our Github site here:
We’ll assume you want to work in python, and want to clone the python examples. If you click on the repository “BrickPi_Python” you will see, on the right hand side “HTTPS clone URL”. This is the link to our Python repository. Copy it (you can do this by just clicking on the little clipboard to the right of the link text).
Next, we will take that link to the repository and “clone” it on our local Raspberry Pi.
We will type “git clone https://github.com/DexterInd/BrickPi_Python.git”
And things will happen. The repository will be cloned on the Raspberry Pi at the directory “/BrickPi_Python”
Now, check that it’s installed by typing “ls -l” and you should see the BrickPi_Python directory, in all of its glory.
Updating the Repository
From time to time, we will update our repositories. People will make suggestions (you can too!) and we’ll try to improve the code. To check for the latest update, simply change directory into “BrickPi_Python” by typing “cd BrickPi_Python”. Then type “git pull” and git will check that your directory is up to date.