-
Notifications
You must be signed in to change notification settings - Fork 4
phenobox setup
Sebastian Seitner edited this page Jan 4, 2018
·
1 revision
This page will outline the required software setup to get the Phenobox up and running.
- Raspberry Pi 3 with Raspbian
- Network File Share (NFS) to store the taken images to
-
Allow the user pi access to the GPIO pins without sudo
- Add a group called gpio and add the user pi to it
sudo groupadd gpio sudo adduser pi gpio
- Give this new group the necessary privileges for the according memory regions used to access the GPIO pins
sudo chown root:gpio /dev/gpiomem sudo chmod g+rw /dev/gpiomem
- Finally if everything went right the permissions should look like this
ls -l /dev/gpiomem crw-rw---- 1 root gpio 244, 0 Nov 23 19:54 /dev/gpiomem
- Add a group called gpio and add the user pi to it
-
Allow the user pi to shutdown the system without entering a password
- use
visudo
to edit the sudoers file and add the following
pi ALL=(ALL) NOPASSWD: /sbin/shutdown
- use
-
Automount the NFS on startup
- Use an entry to /etc/fstab to accomplish this. Please refer to any tutorial on the web on how to do this.
-
Install zBar
sudo apt-get install libzbar-dev sudo apt-get install git-core sudo apt-get install python-dev sudo pip install git+https://github.com/npinchot/zbar.git
-
Install gphoto2
- To install gphoto2 and libgphoto2 please use gphoto2-updater
- To install the python bindings use
pip install -v gphoto2
-
Download the code under /phenobox from the repository onto the Pi and run the following in the root directory of the project
pip install -r requirements
-
Create a file called 'production_config.py' under 'phenobox/config' and fill it according to the description of a sample file
-
Set up a cronjob for user pi to execute the autorun.sh script on reboot
- Use the following to create a new cronjob
sudo crontab -e -u pi
- Enter the following to run the autorun.sh script contained in the repository on ever reboot
@reboot cd /home/pi/photobox; /usr/bin/python autostart.py >> /home/pi/phenobox_cron.log 2>&1
- Use the following to create a new cronjob
Congratulations your Raspberry Pi should be ready to power the Phenobox