This appendix contains the User guide which shows the end user how to run the program as well as carry out various tasks that the software will be used to do.
Auto login: This will allow the Raspberry Pi to automatically log in using the root account without prompting for a username and password during every start up, this only works locally within the Pi, connecting via SSH will still require the user to enter a username and password.
Log in using any account.
Enter ‘sudo nano /etc/inittab’.
Scroll down until ‘1:2345:respawn:/sbin/getty –noclear 38400 tty1’ is visible.
After /sbin/getty type ‘—autologin root’.
It should now read ‘1:2345:respawn:/sbin/getty –autologin root –noclear 38400 tty1’.
Press Ctrl + X, a message should appear ‘Save modified buffer’.
Type ‘Y’, another message will show ‘file name to write’.
Press enter.
Restart the Raspberry Pi and it should automatically log in using ‘root’.
Setting script to auto run: This will allow the Python script to automatically run when the user log into a user (if not using auto login) allowing the program to run with no visual display.
Log in using any account.
Enter ‘sudo nano /etc/profile’.
Scroll down to the bottom of the page.
At the end enter ‘python /home/pi/Desktop/logger.py’.
Press Ctrl + X, a message should appear ‘Save modified buffer’.
Type ‘Y’, another message will show ‘file name to write’.
Press enter.
Restart the Raspberry Pi and the script should automatically start after logging in (if not using the auto login).
Running the script: NOTE: When running the python script try to make sure it is only loaded once (either remotely or locally), if the user load it via SSH and again from the Pi directly it could cause issues and unexpected commands. Using graphical session: To use the program on the graphical desktop a small number of extra steps will be required to ensure the file can be executed
Log in using root user (‘root’)
If the root password has not been set log into the default user (default user: pi default password: raspberry).
Enter ‘sudo passwd’ in terminal the user should receive a prompt asking for the new password then confirmation.
Within the ‘logger’ folder (home/pi/Desktop/logger) a file will be created/updated named ‘light.txt’ and ‘temperatures.txt’ which contain information from the sensors.
Press the left button again (or press 1 on keyboard) to end the sensor data logging.
The green LED will disable and the red LED will again be showing.
(If remotely connected) press Q to end the webcam stream.
Storing webcam footage on the SD card:
The default method when the script is loaded sets it to store data to the SD card (if it has been changed press 2 or middle button/S2).
Terminal view showing store
Locate the left button (indicated by S3) on the Gertboard and press it (or press 1 on a keyboard if remotely connected).
A warning will appear followed by sensor information (temperature and optical).
Terminal view when beginning logging
The red LED will disable and the green LED will now be showing.
Again the sensor information is sent to COSM and can be viewed on;
https://cosm.com/users/scottrpi# - Overview
https://cosm.com/feeds/117510 - Optical
https://cosm.com/feeds/117505 - Temperature
Within the ‘logger’ folder (home/pi/Desktop/logger) a file will be created/updated named ‘light.txt’ and ‘temperatures.txt’ which will contain information from the sensors as well as a ‘webcam-XXXX-XX-XX~XX:XX:XX.mpeg’ file containing the webcam footage and the timestamp from when it was taken (in the filename).
List of contents within logger folder
Press the left button again (or press 1 on keyboard) to end the sensor data logging.
The green LED will disable and the red LED will again be showing.
(If remotely connected) press Q to end the webcam storing.
Taking a single webcam image:
Locate the right button (indicated by S1) on the Gertboard and press it (or press 3 on a keyboard if remotely connected).
The yellow LED will flash on for a second and off again.
A message in terminal should state ‘Writing JPEG image to …’.
Terminal view taking single image
Within the ‘logger’ folder (home/pi/Desktop/logger) a file will be created named ‘image-XXXX-XX-XX~XX:XX:XX.jpg’ which will contain the single image and the timestamp from when it was taken (in the filename).