Hello
I'm new to the Arduino world.
I try to play music using PIR sensor, can anyone help how to start.
I have mega 2560 and PIR
I understand I need SD card reader or some kind MP3 player.
Many thanks.
Szura
Hello
I'm new to the Arduino world.
I try to play music using PIR sensor, can anyone help how to start.
I have mega 2560 and PIR
I understand I need SD card reader or some kind MP3 player.
Many thanks.
Szura
Get an Arduino wav shield Adafruit Wave Shield for Arduino Kit [v1.1] : ID 94 : $22.00 : Adafruit Industries, Unique & fun DIY electronics and kits
It is all the hardware you need to play a file.
This is what i need. Thank you
Is there any code or library to use it with PIR sensor.
Im new to coding.
Thanks
szura133:
Is there any code or library to use it with PIR
No because it is trivial, just treat the PIR like a push button, that is used in the wav example sketches that come with the library.
Thank you
szura133:
Is there any code or library to use it with PIR sensor.
A PIR sensor will usually generate a digital output when activated.
So you just need to "listen" for that change using a digitalRead(pin) statement.
You can then get the Arduino to play the sound when it detects the change in digital readings.
You don't need a library for this type of functionality.
I have a very simple tutorial on how to use a PIR sensor on my blog if you are interested.
There are many MP3 player modules and shields out there. Some better than others.
The one suggested by Grumpy_Mike should be fine. However, there are cheaper alternatives.