3. Download and Install - rmullin7286/TFREC-IR-3G GitHub Wiki
Now that you've finished the required setup, all you have left to do is download the programs!
1. Pi Sensor
a. Download the source code from the github page
If you don't already have the git program installed on your Raspberry Pi, install it by opening a terminal and typing the command:
sudo apt-get install git
Once git is installed, change directory to the desired directory in which you want to install the program. Do this by typing the command:
cd <desired-directory>
Once there, type the commands:
git clone https://github.com/rmullin7286/TFREC-IR-3G.git
cd TFREC-IR-3G
git checkout PiSensor
and if all goes well, the source code should be downloaded to your device.
b. Build the source code and install the program
The second step should be pretty straight forward. Any dependencies needed to build the program should be included in the /Pi_Sensor/ext/ folder. To install all of the dependency libraries and build the programs, just run the setup.py script located in the Pi_Sensor folder. To do this, assuming you've already cd'd to the TFREC-IR-3G folder, type the commands:
cd Pi_Sensor
python setup.py
and the python script should automatically setup the program for you. Once this is done, Pi Sensor should be successfully installed!
c. OPTIONAL: Set the program to boot on startup
The method of doing this is pretty straight forward. All you have to do is enter the /etc/rc.local file by typing:
sudo nano /etc/rc.local
Once there, scroll to the end of the file and type the command:
sh /path/to/directory/TFREC-IR-3G/Pi_Sensor/autoStart.sh
where path to directory is the path to the directory in which the TFREC-IR-3G folder is contained. Once this is done, the program will automatically start on boot. This is useful if you want to run the program without being plugged into a screen, keyboard or mouse.
NOTE: You will have to change the directory in rc.local if you ever want to move the TFREC-IR-3G folder.
2. Pi Hub
a. Download the source code from the github page
This is a similar procedure to the Pi Sensor one. Use the commands:
cd <desired-directory>
git clone https://github.com/rmullin7286/TFREC-IR-3G.git
cd TFREC-IR-3G
git checkout PiHub
Once that's done, run the setup script similar to the Pi Sensor.
b. Running the setup script
Enter the commands:
cd Pi_Hub
sudo python setup.py
NOTE: make sure the python script is run with sudo, as it requires root access.
The python script will automatically begin setting up the program for you. It will install a default config file into the /etc/sakis3g.conf directory. If you need to change any options like the APN, type
sudo nano /etc/sakis3g.conf
and open the text editor for the file. Change the desired option, type CTRL + X and close the text editor.
Next, the script will run through the setup for dropbox_uploader.sh. To do this, go to www.dropbox.com/developers/apps and sign in to your dropbox account if you're not already. Click on the Create App button and create a new app titled Pi IR Sensor. Go into the app settings and click the Generate Access Token button. Copy the output and paste it to the terminal where the script asks for it. This should automatically connect dropbox_uploader.sh with your account. After this, the program will finish building and should be ready to go!
Congratulations! After following all of these steps, you should have a working Pi Sensor and Pi Hub!
c. OPTIONAL: starting Pi Hub on boot
This is the same as part c for the Pi Sensor, except the directory will be
/directory/to/file/TFREC-IR-3G/Pi_Hub/autoStart.sh
Previous: 2. Pre Install Configuration
Next: 4. How to Use