R. Scott Coppersmith
Published © GPL3+

Halloween-of-Things (HoT) And Your Little Internet Too

This project is a Halloween effects controller with video to capture the expressions of the trick-or-treaters and control some effects.

IntermediateProtip16 hours849
Halloween-of-Things (HoT) And Your Little Internet Too

Things used in this project

Hardware components

Raspberry Pi 3 Model B
Raspberry Pi 3 Model B
×1
PIR Motion Sensor (generic)
PIR Motion Sensor (generic)
×1
Molex headers
×1

Hand tools and fabrication machines

Hot glue gun (generic)
Hot glue gun (generic)

Story

Read more

Schematics

Scary Clown Schematic

Simple wiring

Code

Scary Clown Code

Python
Raspberry pi Python code
import RPi.GPIO as GPIO
import time
import os
import pygame
from shutil import copyfile
IRinputPin = 17
GPIO.setmode(GPIO.BCM)
GPIO.setup(IRinputPin,GPIO.IN, pull_up_down=GPIO.PUD_UP)
count = 10
pygame.mixer.init()
pygame.mixer.music.load("/home/pi/Music/Witch.mp3")
print('System Reset')
while (count>0):
    print(count)
    count-=1
    time.sleep(1)
print('System Armed')
while True:
    print('Waiting for input')
    if (GPIO.input(IRinputPin)):
        time.sleep(1)
    else:
        print('IR input detected')
        os.system("fswebcam -r 960x720 -d /dev/video0 /home/pi/webcam.jpg")
        timestr = time.strftime("%Y%m%d-%H%M%S")
        filename2 = ('/home/pi/'+timestr+'.jpg')
        copyfile('/home/pi/webcam.jpg', filename2)
        print('Saving Picture')
        os.system("python /home/pi/sendnotify.py")
        print('Sending email')
        pygame.mixer.music.play()
        print('Resetting System')
        count = 30
        while (count>0):
            print(count)
            count-=1
            time.sleep(1)
        print('System Armed')        

Credits

R. Scott Coppersmith
17 projects • 25 followers
Research Engineer, Embedded systems designer
Contact

Comments

Please log in or sign up to comment.