Making Media Making Devices

In Making Media Making Devices class, we learned the basic workflow of using the Raspberry Pi computer for physical projects. Through the class, I decided to make Time Lapse video by Raspberry Pi camera module.

First, the materials for making time lapse video by Raspberry Pi are as follows.

Hardware

  • Raspberry Pi
  • Raspberry Pi camera module
  • micro usb cable for power supply
  • micro SD card reader
  • micro SD card

Software

  • Raspibian OS
  • Putty
  • Advance IP scanner
  • Vnc viewer
  • Time lapse assembler

I didn’t need a LAN cable to connect directly to my raspberry pie because I will install & connect my Raspibian OS to my laptop with a mobile hotspot via the iPhone and install it on Windows 10. It’s a how to ‘Smartphone Hotspot, No LAN cable’!!

First, connect the MacBook and the Raspberry Pie to the usb cable to provide power. If the power supply works perfectly, then the light turn on as follows.

Before connecting hotspots, download and install the Raspibian OS onto the micro SD card. Then open Notepad to create the ‘SSH, wpa_supplicant.conf‘ file, and insert the files into the folder where the SD card is located.

Then, turn on the mobile hotspot and connect the Wi-Fi from Windows 10 to the hotspot.

Then I could find out my Raspberry Pie IP address with the Advanced IP Scanner software.

Then, I ran Putty software and entered the IP address of my connected Raspberry Pie to connect the Raspberry Pie to my laptop.

I could check the GUI of my Raspberry Pie OS through the VNC Viewer software as follows.

Now, let’s shoot a Time Labs video with a pie camera!
Connect the pie camera to the raspberry pie and enter the following code into the terminal to activate the camera interface.

$ sudo apt-get update

$ sudo apt-get upgrade

$ sudo raspi-config

The basic camera setup is done. Let’s enter the following code to see if the picture is really taken.

$ raspistill -t 2000 -o image.jpg

It seems to be working well. By using shell scripts, I can use the code like ‘sudo nano camera.sh’ in terminal but Instead, I used ‘Thonny‘ software using python scripts to do my time lapse video with the pie camera as follows. The photo size is 1920 x 1080 pixels and I saved the file as ‘camera.py‘ in home/pi folder.

import picamera
from time import sleep
from datetime import datetime, timedelta
 
camera = picamera.PiCamera()
camera.resolution = (1920, 1080)
 
sleep(5)
for filename in camera.capture_continuous('/home/pi/camera/{timestamp:%Y-%m-%d-%H%M%S}.jpg'):
    print('Captured %s' % filename)
    sleep(2)

The following shows the time lapse photos well taken by executed Python scripts.

To check the time lapse photo data on the Window 10 OS, I had to also install a software called ‘samba’ in terminal. This is to share files or printers in Window OS so that I can use. Enter the code at the terminal as follows!

$ sudo apt-get install samba samba-common-bin

$ sudo smbpasswd -a pi

$ sudo nano /etc/samba/smb.conf

Insert this code one after the other behind the file as follows.

[pi]

path = /home/pi

comment = Raspberry Pi SAMBA SERVER

valid user = pi

writable = yes

browseable = yes

create mask = 0777

public = yes

Restart as follows:

$ sudo service smbd restart

I was looking for the best view for my Time lapse movie and finally found a hot place. I was able to film the dynamic and wonderful movement of cars running on the Brooklyn Bridge and ships floating on the Hudson River. As follows, I situated my laptop, Raspberry Pie, and camera and filmed the video. I took total 969 pictures at intervals of 2 seconds.

For my final step, To edit the pictures taken, I used Time Lapse Assembly software, which was set at intervals of 15 framerate as follows.

This is my final output.



Reference

“https://www.youtube.com/watch?v=uLwj4Wj7pRI”