Go Down

Topic: PIR to trigger sound and LED flashes for installation (Read 81 times) previous topic - next topic

pinkblobs

Hi,

I am a newbie to Arduino but I currently have:

Arduino Uno

Vma02 Audio Shield http://www.velleman.co.uk/contents/en-uk/p623_vma02.html

PIR sensors - https://www.amazon.co.uk/gp/product/B00R2U8LLG/ref=oh_aui_detailpage_o02_s01?ie=UTF8&psc=1

LEDs

I have made 5 sculptures and 5 different sound files.

I want to be able to programme the arduino and potentially this sound shield (or another one if someone can recommend how this would be easier).

A PIR sensor will trigger both an LED and 1st sound file to play through speakers in the first sculpture. This should then continue on to allow all other files + synced LED's to play one after an other from different points in the room (different arduinos or different speakers?)

Have succesfully got motion sensor to work which triggered LED to turn on.


Have been able to use the audio shield too but as buttons are used on the shield I am unsure of how to hack so that you don't need to use the buttons.


Any help would be appreciated, I understand this is a lot of information. Can post codes to this forum if needed

thanks in advance any solutions welcome

Grumpy_Mike

#1
May 11, 2017, 08:30 pm Last Edit: May 11, 2017, 08:43 pm by Grumpy_Mike
Quote
Have succesfully got motion sensor to work which triggered LED to turn on.
So in place of the digitalWrite that turns on the LED substitute  the code that plays the file after the digitalRead that looks at the buttons and if statement.

You would have to put a wire link between the buttons you want to press and a free Arduino pin. Make this pin an output and set it low for a button push and high for no press. Keep you fingers off the buttons. If you want to continue to use the buttons then make the link not wire but a 470R resistor, then you can both use Arduino control an the push buttons.

The alternative is to look at the code examples and see how to control the functions of the player with software. The only snag is that the web page is very aggressive and you have to go through 5 pages clicking on the files you don't want to download.

Go Up