Skip to content

Building Instructions

Quoc Le edited this page Jul 28, 2016 · 1 revision

After setting up the raspberry pi and connecting the necessary hardware, update the pi to the latest kernel, GPU firmware, and applications by using the following commands in the terminal: “sudo apt-get update” and “sudo apt-get upgrade”-also use the same method to install the libraries above, for example “sudo apt-get install python-cv” . The battery pack and laser are simply connected in series with one another attached through the switch (power cables to the switch and ground to ground). The photonic sensor module of the raspberry pi is connected in the following way to the pi: Power cable (red) goes into the 3.3V pin, put the data cable (blue) into pin 4, and ground cable (black) into ground pin. If the pin assignments are correct, the sensor’s led will turn green. Align the laser pointer with the photonic sensor and run the source code provided (find directory of main.py and run it via “python main.py”). The camera will now take a picture whenever the sensor stops receiving the analog input of the laser. See illustration 1 for reference. Next program the pi to run this program automatically by modifying rc.local. To access and modify rc.local by type “sudo nano /etc/rc.local” into the terminal. By update the rc.local file, the program will run the when the python when the system startup. This will open rc.local allowing the user to scroll to the bottom and adding the program’s run command (right above the line “exit 0”) . The command for example would be “python x”, where x is the address of main.py referenced using absolute filename (example “python /home/pi/Documents/TripWire/main.py).

Clone this wiki locally