Skip to content

Commit

Permalink
Complete cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
vtjeng committed Nov 21, 2020
1 parent 228e616 commit 0c5c160
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 68 deletions.
14 changes: 1 addition & 13 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,13 +1 @@
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm

*.iml

## Directory-based project format:
.idea/
/bin/
/target/

##
.classpath
.project
.settings/
images/*
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "Dropbox-Uploader"]
path = Dropbox-Uploader
url = [email protected]:andreafabrizi/Dropbox-Uploader.git
1 change: 1 addition & 0 deletions Dropbox-Uploader
Submodule Dropbox-Uploader added at a3df72
25 changes: 23 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,33 @@ Timelapse photography with the Raspberry Pi camera.

## Summary

A long-term time lapse is an effective and fun way to communicate changes over time. However, most cameras which are custom-built to capture time lapse videos are very costly. While DSLRs are able to capture photos at set intervals, the images captured cannot be accessed (without purchasing additional equipment) until the entire set of photos. Our project captures the individual frames of a time-lapse video with cheap, reliable, off-the-shelf components, with the added benefit of allowing one to review and work with the images as they are being captured by uploading the images to Dropbox.
A long-term time lapse is an effective and fun way to communicate changes over time. However, most cameras which are custom-built to capture time lapse videos are very costly. While DSLRs are able to capture photos at set intervals, the images captured cannot be accessed (without purchasing additional equipment) until the entire set of photos. Our project captures the individual frames of a timelapse video with cheap, reliable, off-the-shelf components, with the added benefit of allowing one to review and work with the images as they are being captured by uploading the images to Dropbox.

## Installation

Clone this repository to your Raspberry Pi and run the `run_timelapse` script. By default, the script will take images to the `images` directory once every minute, and _not_ upload it to Dropbox.

### Dropbox Upload

If you would like to upload the images to Dropbox, either ensure that the `images` folder exists on your Dropbox, or run

```sh
./Dropbox-Uploader/dropbox_uploader.sh mkdir images
```

### Auto-Start on Reboot

If you would like the script to run on reboot, add the following line to your crontab via `crontab -e`

```crontab
# runs script once on reboot
@reboot /PATH/TO/REPO/run_timelapse &
```

## Other Work

Plenty of work has already been done in the field of time-lapse photography, including an [Instructables Site](http://www.instructables.com/id/How-to-make-a-long-term-time-lapse/), an amazing [Vimeo video](http://www.photographyblogger.net/a-year-long-time-lapse-study-of-the-sky/), and a [project by David Hunt](http://www.davidhunt.ie/raspberry-pi-in-a-dslr-camera/) using a Raspberry Pi to control a DSLR camera

## Additonal Resources
## Additional Resources

[Testing Multiple Pi Camera Options](https://www.raspberrypi-spy.co.uk/2013/06/testing-multiple-pi-camera-options-with-python/)
2 changes: 0 additions & 2 deletions on_the_pi/crontab

This file was deleted.

23 changes: 15 additions & 8 deletions on_the_pi/rtlC → run_timelapse
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
#!/bin/bash
# Timelapse controller for Raspberry Pi

IMAGEDIR=imagesCONTINUOUS
# directory containing this script: https://stackoverflow.com/a/246128/1404966
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"

IMAGEDIR="images"
DELAY=54
ISUPLOAD=0
# Note: The total time interval between images is
Expand All @@ -22,9 +25,11 @@ do
esac
done

PROJECTDIR=/home/pi/techxtimelapse
mkdir -p "$PROJECTDIR/$IMAGEDIR"
# # /home/pi/Dropbox-Uploader/dropbox_uploader.sh mkdir "$IMAGEDIR"
DROPBOX_UPLOADER_SCRIPT="$DIR/Dropbox-Uploader/dropbox_uploader.sh"

mkdir -p "$DIR/$IMAGEDIR"
## TODO (vtjeng): This is necessary to do the first time. Perhaps the script's mkdir has a -p flag?
# "$DROPBOX_UPLOADER_SCRIPT" mkdir "$IMAGEDIR"

# As of 13 Dec 2013,
# -sh, -co, -sa range from -100 to 100. Default at 0
Expand All @@ -35,11 +40,13 @@ mkdir -p "$PROJECTDIR/$IMAGEDIR"

while true;
do
filename=$(date +"%Y%m%d_%H%M-%S").jpg
raspistill --metering matrix --nopreview --output "$PROJECTDIR/$IMAGEDIR/$filename"
FILENAME=$(date +"%Y%m%d_%H%M-%S").jpg
OUTPUT_PATH="$DIR/$IMAGEDIR/$FILENAME"
raspistill --metering matrix --nopreview --output "$OUTPUT_PATH"

if [ $ISUPLOAD = 1 ]; then
/home/pi/Dropbox-Uploader/dropbox_uploader.sh upload $PROJECTDIR/$IMAGEDIR/$filename $IMAGEDIR
if [[ $ISUPLOAD == 1 ]]; then
# TODO (vtjeng): make this a proper flag
"$DROPBOX_UPLOADER_SCRIPT" upload "$OUTPUT_PATH" "$IMAGEDIR"
fi

sleep "$DELAY"
Expand Down
43 changes: 0 additions & 43 deletions src/main/others/ipmailer.py

This file was deleted.

0 comments on commit 0c5c160

Please sign in to comment.