Make your own stop motion animation rig with a push button, using Python Picamera and GPIO.
You can use LEGO to animate a tower being built, figures acting out a scene, or anything else you can think of!
As well as a Raspberry Pi with an SD card loaded with Raspbian, you'll also need:
- 1 x Raspberry Pi camera module
- 1 x Solderless breadboard (e.g. from Pimoroni)
- 2 x Male-to-female jumper leads (e.g. from Pimoroni)
- 1 x Tactile button (e.g. from RS Components)
- python3-picamera
- ffmpeg
See more information on checking you have these packages installed, and how to install them on the software installation page.
- Animation subject (e.g. LEGO)
- Camera mount (optional but useful)
- Test the camera
- Take a picture with Python
- Connect a hardware button
- Take a selfie
- Stop motion animation
- Render the video
You'll need the worksheet for the instructions and the GPIO diagram for the button setup. Optionally, you can download the final version of the code to save typing it out.
- The worksheet
- GPIO diagram
- (Optional) Final version of Python code animation.py
- Download to the home directory with
wget http://goo.gl/ZFsiyP -O animation.py --no-check-certificate
- Download to the home directory with
The rendering process is intensive and with many frames can take a long time on the Pi. You may wish to render the video on another computer using general video editing software such as Movie Maker on Windows, iMovie on Mac or mencoder
on Linux.
This worksheet works fine in both Python 2 and Python 3. Python 3 is recommended but if you require Python 2 for an extension of the worksheet, simply use the equivalent Python 2 packages when installing. See the software installation page.
Unless otherwise specified, everything in this repository is covered by the following licence:
Push Button Stop Motion by Dave Jones and the Raspberry Pi Foundation is licenced under a Creative Commons Attribution 4.0 International License.
Based on a work at https://github.com/raspberrypilearning/push-button-stop-motion