Make sure you've followed all of the steps in the guide to:
- Get your Claude API key
- Setup the speaker bonnet audio output
- Setup your Python virtual environment
- Install Blinka
If you skip any of these steps the project will not work!
Power up the Raspberry Pi with a 5.1V/3A USB C power supply and run the script. You'll see the video preview appear on the desktop.
To avoid having to use an external display, you can use the Raspberry Pi Connect software to remotely log into your Pi and start a screen sharing session.
When a person is identified, the LED eyes will light up to let you know that the script is running. After a moment, you'll hear the Claude-generated joke come through the speaker. When the joke is done playing, the LEDs will turn off.
If there are any problems with making a request to the Anthropic API (bad API key, connection error, unable to detect a costume, etc) then the "Happy Halloween" audio file will play instead. You'll be able to see what the actual error was in the terminal window for troubleshooting.
API Reference Links
For more information on the API's used in this project, check out the links below:
Page last edited October 28, 2025
Text editor powered by tinymce.