Raspberry pi projects for making media making devices

Here is the link we used to set up

 https://projects.raspberrypi.org/en/projects/raspberry-pi-setting-up/5

 

Project 1: Stop motion project

Tutorial used https://projects.raspberrypi.org/en/projects/push-button-stop-motion/8 

 For this one we got to the part where we were able to take photos of all the drawings we made using the camera connected to raspberry pi. However we ran into two issues

1. The images came out very blurry. We read online that this happes when you take photos of something so close up. We decided to take the photos with our phones and edit them with Photoshop and use those instead. 

This worked fine:

camera.start_preview()
frame = 1
while True:
    try:
        button.wait_for_press()
        camera.capture('/home/pi/animation/frame%03d.jpg' % frame)
        frame += 1
    except KeyboardInterrupt:
        camera.stop_preview()
        break

2. When it came time to stitching the photos together the command line diff not produce a video output. We hope to ask the instructor in class for help on this. 

The line below did not work at all but there was no error message. We could not locate the file animation.h264 however.

avconv -r 10 -i animation/frame%03d.jpg -qscale 2 animation.h264


IMG_4261.JPG
    Code


Code

 

 

Project 2: Motion sensor detector used to trigger video

Parent detector is the tutorial we used. 

We got the motion sensor to work but the code for figuring out how to start the recording.

from picamera import PiCamera
from gpiozero import MotionSensor
pir = MotionSensor(4)
 
camera = PiCamera()
camera.capture(‘home/pi/Desktop/pics.png’)
 
while True:
            pir.wait_for_motion()
            print(“Motion detected”)
            camera.start_preview()
            pir.wait_for_no_motion()
            camera.stop_preview()

 

  Anita and I and Jasmine who stopped by:

IMG_4230.JPG