What do you do on the day after a Wild Card victory?  You break out the IR camera to see what you can see, that’s what.

The camera is connected to a Raspberry Pi, an inexpensive computer.  It uses several of the input/output pins to either take an image or make a video.  The pictures below show what it looks like when I hold up a piece of paper.

Just me, holding up a piece of paper.  My face is really warm, and my nose is cold.  (So is my office).

Just me, holding up a piece of paper. My face is really warm, and my nose is cold. (So is my office).

 

My warm hand against the paper.  In the visible spectrum, you wouldn't see anything.  In the IR, you pick up the heat.

My warm hand against the paper. In the visible spectrum, you wouldn’t see anything. In the IR, you pick up the heat.

 

Inside, I am a balmy 37C.  When I breath on paper you see it heat up, but in the visible spectrum, this would be totally unremarkable.

Inside, I am a balmy 37C. When I breath on paper you see it heat up, but in the visible spectrum, this would be totally unremarkable.

 

Instructions for this are well documented in a couple other places.

One important thing to note is that you have to find a directory, according to the instructions above.  The directory has been relocated to:

/LeptonModule/software/raspberrypi_libs/leptonSDKEmb32PUB

The above instructions tell you to look for it in

/LeptonModule/software/raspberrypi_video

After you compile the code you need to cd into

/LeptonModule/software/raspberrypi_video

That little change took me an hour to figure out, but I am perpetually new at this.

Inspiration

Not long ago, I stumbled upon Ken Murphy’s amazing History of the Sky project.  The concept is simple; take a picture of the from sunrise to sunset every 10 seconds every day for a year.  He then made a mosaic of the images, and ran it as a slide show all at once.  You know what, I think its easier if I just show you what he did:

A History of the Sky from Ken Murphy on Vimeo.

Around the time I found this, I started diving in to the Raspberry Pi, and I thought that this little computer could probably reproduce Ken’s amazing project.  I thought I could update it with the Chicago Skyline.

After a series of false starts, I finally got a Raspberry Pi and camera sealed inside a sandwich container (my version of a weather-proof box).  It is currently sitting on the roof of the McGowan Science building at DePaul University.  It wakes up at 4:30AM every day, and takes a picture every 10 seconds until 8:30AM.  That is 360 pictures per hour or 1440 per day.  Another program compresses them into a movie, which gets uploaded into my DropBox account.  My project started on October 1st, 2015, so I have captured a week of Chicago sunrises.  Here is the first one:

Another Raspberry Pi downloads the movies, and breaks them into a series of stills.  When I have enough, they will be assembled into a mosaic image, and turned back into a movie.  With luck, I will have 365 movies to work with.

This Python Program is what I use to take the pictures.


import time
import picamera

VIDEO_DAYS = 1
FRAMES_PER_HOUR = 360
FRAMES = FRAMES_PER_HOUR * 3 * VIDEO_DAYS

file = "/home/pi/camera/frame_%04d.jpg"
#file = str("/home/pi/camera/" + time.strftime("%Y%m%d") + "_%04d.jpg")

def capture_frame(frame):
with picamera.PiCamera() as cam:
time.sleep(2)
cam.resolution=(1280,720)
cam.capture(file % frame)

# Capture the images
for frame in range(FRAMES):
# Note the time before the capture
start = time.time()
capture_frame(frame)
# Wait for the next capture. Note that we take into
# account the length of time it took to capture the
# image when calculating the delay
time.sleep(
int(60 * 60 / FRAMES_PER_HOUR) - (time.time() - start)
)


This code was used to turn it into a movie. It is a bash script


#!/bin/bash

DATE=$(date +"%Y%m%d")

avconv -r 10 -i /home/pi/camera/frame_%04d.jpg -r 10 -vcodec libx264 -crf 20 -g 15 /home/pi/camera/$DATE.mp4


Finally, this Python Program uploaded it to DropBox.


import time
from subprocess import call

date = time.strftime("%Y%m%d")
path = "/home/pi/camera/"+date+".mp4"
destination = date+".mp4"

photofile = "/home/pi/Dropbox-Uploader/dropbox_uploader.sh upload "+path+" "+destination

call ([photofile], shell=True)


It isn't very difficult, and this is the best way to really see the days getting longer and shorter, and connecting that to the Earth's tilt as it goes around the sun.