In the previous blog (blog1), i have made some noise in a loop. In this blog we going to integrate PIR sensor and it plays
music on person entry.
Sensor Interface
I have brought Mini sensor from adafruit https://www.adafruit.com/product/4667. More details are there to getting start with it.
Interfaced to Pico via GPIO's (GP3), Initialized as sense = digitalio.DigitalInOut(board.GP3)
sense.switch_to_input(pull=digitalio.Pull.UP)
PIN1 - GND
PIN2 - GND
PIN3 - 3.3V
PIN4 - SIGNAL
Working Demo
The PIR sensor detects the motion or Person entry and produce the High signal for 2 seconds. Its indicated by the Yellow LED.
On high logic the BGM /MP3 file is played for its duration. In the someway random BGM's can be played on each times.
in the next blog we will be integrating the Neo Pixel RGBW LED's to produce cool lights effects while playing the music.
Working video is here
In the next blog (blog3) we will add NeoPixel RGB LED Ring to the project.