{"id":18841687,"url":"https://github.com/davidbates/the-pumpkin-king","last_synced_at":"2025-09-09T11:21:18.004Z","repository":{"id":205022186,"uuid":"712640348","full_name":"DavidBates/The-pumpkin-king","owner":"DavidBates","description":"An AI driven pumpkin that uses GPT, Eleven Labs, and even some custom hardware to scare the pants off of kids. ","archived":false,"fork":false,"pushed_at":"2023-11-01T05:42:32.000Z","size":13319,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-18T03:02:54.724Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DavidBates.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-10-31T22:01:56.000Z","updated_at":"2023-11-02T03:36:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"5315c994-12ac-4760-bb98-653a23132c4b","html_url":"https://github.com/DavidBates/The-pumpkin-king","commit_stats":null,"previous_names":["davidbates/the-pumpkin-king"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/DavidBates/The-pumpkin-king","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavidBates%2FThe-pumpkin-king","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavidBates%2FThe-pumpkin-king/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavidBates%2FThe-pumpkin-king/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavidBates%2FThe-pumpkin-king/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DavidBates","download_url":"https://codeload.github.com/DavidBates/The-pumpkin-king/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavidBates%2FThe-pumpkin-king/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274290449,"owners_count":25258150,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-09T02:00:10.223Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T02:52:10.969Z","updated_at":"2025-09-09T11:21:17.985Z","avatar_url":"https://github.com/DavidBates.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# The Pumpkin King 🎃👑\n\nA fun and interactive project that combines the power of SwiftUI (MacOS), Adobe Character Animator, and Arduino (ESP32 BLE) to switch between \"Active\" and \"Idle\" states based on human detection.\n\n![Pumpkin King Logo](./pumkin_king.png) \n\n## Table of Contents\n\n- [Description](#description)\n- [Technologies](#technologies)\n- [Setup](#setup)\n- [Usage](#usage)\n- [Contributing](#contributing)\n- [License](#license)\n\n## Description\n\nThe Pumpkin King is a unique combination of software and hardware that detects human presence and switches modes in a SwiftUI application. When a person is detected, it transitions from an \"Idle\" state to an \"Active\" state, answering questions with the power of [OpenAI](https://openai.com/) and [Eleven Labs](https://elevenlabs.io/).\n\n[Video Example](https://www.tiktok.com/@modern.magician/video/7295958411190095146?is_from_webapp=1\u0026sender_device=pc\u0026web_id=7284093191287670315) \n\n[Video of the beam/break detector](https://www.tiktok.com/@modern.magician/video/7294650655363435819?is_from_webapp=1\u0026sender_device=pc\u0026web_id=7284093191287670315)\n\n## Technologies\n\n- **SwiftUI**: For creating a visually appealing and responsive iOS application.\n- **Arduino**: Used for the hardware component to detect human presence.\n- **BLE (Bluetooth Low Energy)**: For seamless communication between the hardware and software components.\n- **Adobe Character Animator**: Creates a face that you can project onto a [blow-up pumpkin](https://www.lowes.com/pd/WELLFOR-4-Feet-Halloween-Inflatable-Pumpkin-with-Build-in-LED-Light/5013900537).\n- **OpenAI Whisper**: Used to take the audio recording of the user's question and turn it into text.\n- **OpenAI Completions**: Used to generate a response to the user's question in the style of the pumpkin king.\n- **Eleven Labs**: Used to generate an audio response in a custom voice that is sure to spook the kids.\n\n## Setup\n\n### Software (Xcode Project)\n\n1. Clone the repository: `git clone [repository_link]`.\n2. Open `PumpkinKing.xcodeproj` in Xcode.\n3. Build and run the project on a Mac or an iOS device.\n4. Goto the preferences in the main menu and enter in your API keys\n\n### Hardware (Arduino)\n\n1. Setup your Arduino board This project assumes [HiLetgo 0.96\" ESP32 OLED (Amazon Non-Affiliate Link)](https://www.amazon.com/gp/product/B072HBW53G).\n2. Connect the required sensors and components [Tutorial for Photoresistor](https://www.instructables.com/How-to-use-a-photoresistor-or-photocell-Arduino-Tu/), [Laser Diode (Amazon Non-Affiliate Link](https://www.amazon.com/HiLetgo-KY-008-Transmitter-Module-Arduino/dp/B01I1J12JO), [Photoresistor (Amazon Non-Affiliate Link)](https://www.amazon.com/HiLetgo-Dependent-Photoresistor-Photoconductive-Resistance/dp/B00N1ZJUN4).\n3. Open the Arduino IDE and load the provided `.ino` file. (Configure the boards and libraries needed) \n4. Upload the code to your Arduino board.\n\n### 3DModels \nI've uploaded the 3D models to Thangs these models make it easier to setup the beam break sensor outside. \n1. The sensor board and laser board: [thangs](https://than.gs/m/955710)\n2. The ground stakes and caps: [thangs](https://than.gs/m/955712)\n\n## Usage\n\n1. Start the SwiftUI application.\n2. Power on the Arduino setup.\n3. Approach the Arduino sensor.\n4. Watch as the SwiftUI application transitions from \"Idle\" to \"Active\" mode, playing a synthesized response.\n\n## Contributing\n\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Please make sure to update tests as appropriate.\n\n## License\n\n\u003chtml\u003e\n\u003cp xmlns:cc=\"http://creativecommons.org/ns#\" xmlns:dct=\"http://purl.org/dc/terms/\"\u003e\u003cspan property=\"dct:title\"\u003ePumpkin King Human Detector\u003c/span\u003e by \u003ca rel=\"cc:attributionURL dct:creator\" property=\"cc:attributionName\" href=\"https://magician.dev\"\u003eDavid Bates\u003c/a\u003e is licensed under \u003ca href=\"http://creativecommons.org/licenses/by/4.0/?ref=chooser-v1\" target=\"_blank\" rel=\"license noopener noreferrer\" style=\"display:inline-block;\"\u003eAttribution 4.0 International\u003cimg style=\"height:22px!important;margin-left:3px;vertical-align:text-bottom;\" src=\"https://mirrors.creativecommons.org/presskit/icons/cc.svg?ref=chooser-v1\"\u003e\u003cimg style=\"height:22px!important;margin-left:3px;vertical-align:text-bottom;\" src=\"https://mirrors.creativecommons.org/presskit/icons/by.svg?ref=chooser-v1\"\u003e\u003c/a\u003e\u003c/p\u003e\n\u003c/html\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidbates%2Fthe-pumpkin-king","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavidbates%2Fthe-pumpkin-king","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidbates%2Fthe-pumpkin-king/lists"}