Data Logger using Raspberry Pi Scott Cairns 1817523


Appendix C Software Installation guide



Download 200.65 Kb.
Page10/12
Date31.07.2017
Size200.65 Kb.
#25490
1   ...   4   5   6   7   8   9   10   11   12

Appendix C Software Installation guide


This appendix contains a Software Installation guide to allow end users to install the Python program and make use of the included installer; it also includes information regarding how to set up the Gertboard and breadboard.
Steps for installing the modules and software required for the Python script:


  1. Copy the installation.py file to the Desktop (home/pi/Desktop) (via FTP, USB flash drive, or any preferred method).



  1. (In the terminal window) run the command “cd /home/pi/Desktop”, to navigate to the correct folder.



  1. Run the command “python installation.py” – This will run through the Python script, it may take some time to complete depending on the users internet connection. Once complete a message will appear to confirm it has been completed.



  1. If new updates are required the user will be required to press Y/N to proceed with the installation (this may happen up to 6 times over the course of the installation)



  1. Once the “Complete!” message shows up in the terminal install py-spidev

    1. Navigate to the folder using “cd py-spidev

    2. Run “sudo python setup.py install

This will navigate into the py-spidev directory then run the setup.py file which will install the python module spidev.


  1. Install setuptools

    1. Navigate to the folder using “cd /home/pi/Desktop/setuptools*

    2. Run “sudo python setup.py build

    3. Run “sudo python setup.py install

Again, taking the user into the setuptools directory then running build and install on setup.py, which will install the Setuptools software.
* The exact name will vary depending on the current release version.


  1. Install EEML

    1. Navigate to the folder using “cd /home/pi/Desktop/geekman-python-eeml*

    2. Run “sudo python setup.py install

This navigates the user into the geekman-python-eeml folder then running setup.py to install, which will install the EEML python module.
* The exact name will vary depending on the current release version.


  1. Install evdev

    1. Navigate to the folder using “cd /home/pi/Desktop/python-evdev

    2. Run “git checkout $versiontag

    3. Run “sudo python setup.py install

This navigates the user into the python-evdev directory, uses the versiontag which updates files in the tree to match the version specified and runs setup.py to install.


  1. Install FFMPEG

    1. FTP or log into root then edit /etc/apt/sources.list_”__Add_“deb-src_http://www.deb-multimedia.org_sid_main_”__Add_“deb_http://www.deb-multimedia.org_wheezy_main_non-free'>“/etc/apt/sources.list

    2. Add “deb-src http://www.deb-multimedia.org sid main

    3. Add “deb http://www.deb-multimedia.org wheezy main non-free

    4. Run “sudo apt-get update

    5. Run “sudo apt-get install deb-multimedia-keyring

    6. Remove “deb http://www.deb-multimedia.org wheezy main non-free” from “/etc/apt/sources.list

    7. Run “sudo apt-get source ffmpeg-dmo

    8. Navigate to the folder using “cd ffmpeg-dmo*

    9. Run “./configure

    10. Run “make && make install

    11. Remove “deb-src http://www.deb-multimedia.org sid main” from “/etc/apt/sources.list

This will download the ffmpeg files and install them, FFMPEG could take up to a few hours to install (step I and J).


  1. Create the ffserver.conf file in “/etc/” – The source code for this file is contained with the documentation.

Steps for preparing the Gertboard:


  1. Place one jumper on B1, B2 and B3 (2 pin slots right of C9).



  1. Place one jumper on 3V3 (Note: the 3V3 jumper should be on the upper two pins above J7, not the 3V3 at the top of the board).



  1. Set up SPI, place jumpers on:

    1. GPIO 11/SCLK

    2. GPIO 10 / MOSI

    3. GPIO 9 / MISO

    4. GPIO 8 / CSnA



  1. Set up buttons as GPIO, place jumper cables between:

    1. B1 and GPIO 25

    2. B2 and GPIO 24

    3. B3 and GPIO 23



  1. Place jumper cable between 3V3 (top of the board) and + on breadboard.



  1. Place jumper cable between GND (right of AD1 near J28) and – on breadboard.



  1. Set up connection to breadboard, place jumper cables between:

    1. GPIO 22 and long pin on green LED

    2. GPIO 18 and long pin on yellow LED

    3. GPIO 17 and long pin on red LED

    4. AD1 and middle pin of TMP36 (Temp sensor)

    5. AD0 and middle pin of Optical sensor

Steps for preparing the breadboard:


  1. Place 330 ohms resistors between:

    1. negative (GND) and the smaller pin on the green LED

    2. negative (GND) and the smaller pin on the yellow LED

    3. negative (GND) and the smaller pin on the red LED



  1. Place jumper cables between:

    1. Positive (3V3) and the top pin of the temperature sensor

    2. Negative (GND) and the bottom pin of the temperature sensor

    3. Positive (3V3) and the bottom pin of the optical sensor

    4. Negative (GND) and the top pin of the optical sensor



  1. Add a .01uF capacitor to both sensors between the 3V3 and GND connections (top and bottom).

Steps for changing the webcam:

  1. Log in to the Raspberry Pi using any account available (default user: pi password: raspberry)

    • To view the list of devices enter ‘uvcdynctrl –l’ this should display a list of devices including the camera.



    • To view the list of available actions enter ‘uvcdynctrl –c’, this will show a list of controls for the device such as zoom, brightness, and contract.



    • To get the current value of any control enter ‘uvcdynctrl –g control’ where control is the value the user wishes to obtain such as the contrast.



    • To set a value for any of the controls enter ‘uvcdynctrl –s control value’ for example ‘uvcdynctrl -s hue 0’ to set the Hue value to 0.



    • To list the available frame formats enter ‘uvcdynctrl –f’, this will give a list of the available frame sizes, frame rates and pixel formats.

screenshot1939

List of frame formats for webcam


  1. Open ‘logger.py’ either remotely or locally.



  1. To change the variables for the storing or streaming of webcam

    1. Scroll down to ‘def startRecord(method):’

    2. Edit the appropriate variables (frameRate, frameSize, and other important parameters)







  1. To change the variables for the single image capture

    1. Scroll down to ‘def singleImg():’

    2. Edit the appropriate variables (frameSize, inputName)



  1. Save the Python script and execute it.

Directory: ~aka

Download 200.65 Kb.

Share with your friends:
1   ...   4   5   6   7   8   9   10   11   12




The database is protected by copyright ©ininet.org 2024
send message

    Main page