You Do It Electronics in Needham asked me to help out with their Arduino Day celebration on Saturday March 29, and I wanted to make a nice Arduino demo that uses parts that they sell, relatively simple, and Fun! You Do It also sells DJ and disco equipment, so I thought what would be better than Arduino controlled Disco lights and Music?
Here are the Parts I chose:
Sparkfun Motion sensor (to trigger the Instant Party)
Sparkfun MP3 Shield
Sparkfun proto-screw Shield (to make it easy to hook up.)
Power Switch Tail – turn on the disco lights
You’ll also need a micro-sd card and some music. I chose some Creative Commons Techno from Soundcloud:
First, we need to find out what pins are in use in the MP3 Shield so we can figure out where to hook up the motion sensor and power switch tail.
The easiest way to do that is by looking at the schematic, or this page at Sparkfun: https://learn.sparkfun.com/tutorials/mp3-player-shield-hookup/hardware-overview
Digital Pins 5 and 10, and Analog Pins A0-5 are all free.
I used the analog lines because they are close to the power and ground pins for both the power switch tail and the PIR motion sensor.
Because the PIR output is open collector, I use the internal pullups on the Arduino.
Git the code here: https://github.com/osbock/InstantParty