Welcome to the forum !

There is TONS of examples on how to light or even fade LEDS in the playground.

This will not be a problem for you.

There is also an example for the parallax PING ultrasonic range sensor there !

Starting an external MP3 player by faking a button-press event is also easy, but requires some soldering. The Arduino just acts as a switch here. This can be done with the digitalWrite() function.

Try to make the LED part work in the first place. It’s the cheapest and probably easiest part also. For driving many RGB leds and getting smooth color transitions you’ll want to have a look at this:

This chip is essentially 6 variable resistors you can adjust with the Arduino controller, so 2 RGB LEDs per chip.

If you’ve gained some knowledge and confidence take the next step.


Get a breadboard and a decent wire cutter!

Hi, many thanks for your kind response.
The truth is that I’m aware of the availability of all these codes but my problem is in incorporating them together.
As for the music part, I have acquired VMUSIC (Tech Art Blog: VMUSIC2 on Arduino) This module takes a standard USB Flash drive for storage, can playback MP3 files, is controlled with a rich set of commands over a serial connection. I was actually hoping to find a written code that I could just modify.
Still, I do appreciate the assistance.

You can start by writing ‘pseudocode’ to map out what you want to happen and what needs to happen to trigger that then take a small section of this and write real code to do that. once you get the sections written you can string them together as subroutines into a complete program. If you have trouble with a section of code post it here and we can work with you on getting it to work.

Serial.print("V3A"); #play all files
Serial.print(13,BYTE); # ENTER KEY
delay(5000); #wait five seconds
Serial.print("VST"); #stop playing
Serial.print(13,BYTE); # ENTER KEY

That’s it !

It’s all in the blog you’ve linked.

All the codes the module understands are in here:

So all you have to do is something like this (pseudo code):

void setup(void) {
   byte parallax_sensor_pin = some_pin;
   // and so on
   // and so on

void loop(void) {
   static byte is_playing = 0; /* only set it to 0 once and remember */
   int distance = read_ping_sensor();
   if( (distance < some_value) && (is_playing == 0) ) {
      Serial.print("V3A");  /* play all files */
      Serial.print(13,BYTE); /* ENTER KEY */
      is_playing = 1; /* remember it's playing */
   else if ( (distance > some_value) && (is_playing == 1) ){
      Serial.print("VST"); /* stop playing */
      Serial.print(13,BYTE); /* ENTER KEY */
      is_playing = 0; /* remember that it's not playing */
   else { /* keep on playing... */ }
   make_leds_work(distance); /* feed distance into led routine */

void make_leds_work(int distance) {
   /* decide what to do with the leds */

Please do forgive my ignorance but as I said earlier I am very new into all this so I lack the coding ability. As I said, i was actually looking for a pre-existing script/code. I am willing to learn it though, I just hope I can meet the timing which is friday.
At this point, I’ll appreciate all the assistance I can get from start to finish and I hope to learn as i go ahead since i have the interest.

I appreciate all the effort.

Hi can anyone tell me how to wire a Super bright 5mm RGB Led (4 pins) to a breadboard on Arduino? I will appreciate links and codes too.