Sunday, June 23, 2019

Install Sensor libraries on Rasberry Pi - Lou Person - STEM - Girls Who Code


In this post, we will install the libraries (blocks of software code) that you will reference in the python code in the lessons later.  You should have received a copy of "Sensor Kit V2.0 for Rasberry Pi B+".  If you don't have it, or want to read it online, please go here: http://gwc.daisyware.com/manual.pdf We will refer to this as "the manual" from now on.

First, open a terminal on the Rasberry Pi to install the libraries.  Go to page 13 of the manual to see "How to Open a Terminal".  Stop on the bottom of Page 16, we will use Putty later.

Second, go to page 23 of the manual to "Install Libraries".  You will install Wiring Pi.  We will be using GitHub and Linux commands to install libraries.  It's easy, don't worry!
Read step 1, you will enter this command: git clone git://git.drogon.net/wiringPi
Read step 2, you will enter these commands.  Type (or copy and paste) these command one at a time, pressing enter each time, the manual will provide more details:
cd wiringPi 
git pull origin 
./build 
Read step 3 and run the tests.

Third, go to page 25 and look at Method 2.
Change directory to /home/pi by typing this command and pressing enter:
cd /home/pi/ 
Now that you are in this directory, download the code from GitHub.  Type (or copy and paste) the command below and hit enter after:
git clone https://github.com/sunfounder/SunFounder_SensorKit_for_RPi2 

Now that everything is installed, you are going to wire your first sensor and run the python program you just installed to make the LED turn different colors!






No comments:

Post a Comment