Skip to content

Raspberry pi project that controls jack-o-lantern via servo motor and PIR motion sensors

License

Notifications You must be signed in to change notification settings

circa10a/pumpkin-pi

Repository files navigation

pumpkin-pi 🎃

Build Status PkgGoDev Go Report Card

Raspberry pi project that controls jack-o-lantern via servo motor and PIR motion sensors to simulate it "watching" you.

Inspired by Ryder Damen's mannequin head

Demo

This project was originally built for outdoor use pumpkin-pi demo

Photos

Note: Holes in the acrylic case are needed for the motion sensors to properly work

Wiring diagram

Created with circuit-diagram.org. Source file is in /diagrams

alt text

Deploy

Requires following diagram above to be wired up correctly

Docker

# This script will install the dependencies and start the containers
bash -c "$(curl -sL https://raw.githubusercontent.com/circa10a/pumpkin-pi/main/install.sh)"

Go

Requires Go 1.17+

  1. Install Go
  2. Install pi-blaster
  3. go install github.com/circa10a/pumpkin-pi@latest
  4. pumpkin-pi

Materials

Configuration

Environment Variable Description Required Default
PUMPKINPI_LOG_LEVEL Logrus log level. Use debug for more info false info
PUMPKINPI_MOTION_TIMES_ENABLED Whether to use configured schedule or not. These times must be within the same day false false
PUMPKINPI_MOTION_TIME_START Local time to ensure pumpkin-pi only responds after this hour false 17
PUMPKINPI_MOTION_TIME_END Local time to ensure pumpkin-pi only responds before this hour false 22
PUMPKINPI_PIR_LEFT_MOTION_SENSOR_GPIO_PIN The GPIO Pin used to read inputs from left motion sensor false 11
PUMPKINPI_PIR_RIGHT_MOTION_SENSOR_GPIO_PIN The GPIO Pin used to read inputs from right motion sensor false 13
PUMPKINPI_SERVO_CENTER The center position of the horizontal servo motor false 29
PUMPKINPI_SERVO_LEFT The left position of the horizontal servo motor false 20
PUMPKINPI_SERVO_RIGHT The right position of the horizontal servo motor false 40
PUMPKINPI_SERVO_ROTATE_DELAY The wait time in between each incremental servo step as it rotates false 150ms
PUMPKINPI_SERVO_CENTER_RESET_INTERVAL The interval at which the pumpkin will rotate back to the center position false 5m
PUMPKINPI_SERVO_GPIO_PIN The PWM enabled GPIO Pin used to control the servo motor false 12

About

Raspberry pi project that controls jack-o-lantern via servo motor and PIR motion sensors

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published