Detects motion and plays a dog bark sound when it's dark.
Special Halloween Edition: https://github.com/andruhon/pico-dog/tree/halloween-edition
See PROJECT.md for a detailed project writeup with build instructions and real-world performance notes. See materials.md for the list of materials used. See circuit.md for circuit details.
Dog bark sound:
Dog Bark by abhisheky948 (Distributed under CC0 license)
If you need to work with the project files locally, you can create a Python virtual environment:
python -m venv venv
source venv/bin/activate
python -m pip install -r requirements.txt
This package uses the following packages as dependencies:
- https://github.com/CoreElectronics/CE-PiicoDev-Unified/blob/main/PiicoDev_Unified.py
- https://github.com/CoreElectronics/CE-PiicoDev-VEML6030-MicroPython-Module/blob/main/PiicoDev_VEML6030.py
- https://github.com/joeky888/awesome-micropython-lib.git
- https://github.com/danjperron/PicoAudioPWM.git
Prerequisites: MicroPython must already be installed on your Raspberry Pi Pico. Installation instructions can be found at https://micropython.org/download/RPI_PICO/
Note: Connecting to Raspberry Pi Pico on Linux may sometimes be challenging. Check linux.md for troubleshooting tips.
mpremote documentation: https://docs.micropython.org/en/latest/reference/mpremote.html
Install dependencies to Pico:
mpremote mip install github:CoreElectronics/CE-PiicoDev-Unified/PiicoDev_Unified.py
mpremote mip install github:CoreElectronics/CE-PiicoDev-VEML6030-MicroPython-Module/PiicoDev_VEML6030.py
mpremote mip install github:joeky888/awesome-micropython-lib/Audio/chunk.py
mpremote mip install github:joeky888/awesome-micropython-lib/Audio/wave.py
mpremote mip install github:danjperron/PicoAudioPWM/myDMA.py
mpremote mip install github:danjperron/PicoAudioPWM/myPWM.py
mpremote mip install github:danjperron/PicoAudioPWM/wavePlayer.pyCopy sources to Pico:
mpremote fs cp -r src/* :Verify installation:
- Run
mpremote lsto make sure everything is copied over (you may need to restart the Pico to pick up changes) - Run
mpremote dfto check available space on the Pico
When using your own sounds, make sure they are 16-bit WAV files with a 16000 Hz sample rate. You can use Kwave (open source audio editor) to convert files.
Recovery: If you copied a corrupted file and your Pico seems to be bricked, you can flash it with the official Raspberry Pi memory reset: flash_nuke.uf2
- PIR Sensor Tutorial - Explains how PIR sensors work (Arduino-based but applicable)
- PiicoDev VEML6030 Guide - Light sensor quickstart guide
This repository uses two different licenses for files — Creative Commons BY-SA 4.0 for circuit schematics and MIT for code.
Please note the repository pulls in source code from other repositories, most of them are MIT and Creative Commons, pleaser refer to Dependencies section of this README to find other repositories in use.

