Arduino F1 Starting Lights Simulator

Published

Introduction: Arduino F1 Starting Lights Simulator

Ever wanted an F1 starting light simulator in your household. Well now you can! With this simple Arduino Project, That won't take much of your precious time!

Made by

Remo X.

Timo P.

Step 1: Gathering Materials

For this Project you will be needing the following:

- 5 red LEDs

- 5 220 Ohm resistors

- 1 1k Ohm resistor

- 1 Button (no F1 pun intended ^^)

- A shit ton of jump wires

- Sparkfun MP3 Shield( If you want to hear David Croft Screaming in your ear)

- Arduino Uno

- Speaker or Headphones

- 2 (or 1) Breadboards

-Download this mp3 file ----> track001 (you can find it below)

-SD card + Adapter

Step 2: Constructing!

To construct this project simply follow the instructions in the picture above!

Step 3: The Code!

Now the only part left for us to do is put in the code!

the code:

#include 
#include            // SPI library
#include          // SDFat Library
#include      // SDFat Util Library
#include   // Mp3 Shield Library
SdFat sd; 
SFEMP3Shield MP3player; 
// These variables are used in the MP3 initialization to set up
// some stereo options:
const uint8_t volume = 0; // MP3 Player volume 0=max, 255=lowest (off)
const uint16_t monoMode = 1;  // Mono setting 0=off, 3=max
int button=A1;
int lampjes[] = {5, 10, A2, A4, A3};
void initSD()
{
  //Initialize the SdCard.
  if(!sd.begin(SD_SEL, SPI_HALF_SPEED)) 
    sd.initErrorHalt();
  if(!sd.chdir("/")) 
    sd.errorHalt("sd.chdir");
}
void initMP3Player()
{
  uint8_t result = MP3player.begin(); // init the mp3 player shield
  if(result != 0) // check result, see readme for error codes.
  {
    // Error checking can go here!
    Serial.println("MP3 error! " + result);
  }
  MP3player.setVolume(volume, volume);
  MP3player.setMonoMode(monoMode);
}
void setup() {
pinMode(5,OUTPUT);
pinMode(A4,OUTPUT);
pinMode(A3,OUTPUT);
pinMode(A2,OUTPUT);
pinMode(10,OUTPUT);
pinMode(button,INPUT);
Serial.begin(115200);
initSD();  // Initialize the SD card
initMP3Player(); // Initialize the MP3 
for (int n = 0; n < 5; n++) {
  digitalWrite(lampjes[n], LOW);
}
}
void loop() {
if(digitalRead(button)==1) {
  Serial.println("Knopje!");
  MP3player.playTrack(001);
  digitalWrite(5,HIGH);
  delay(1000);
  digitalWrite(A4,HIGH);
  delay(1000);
  digitalWrite(A3,HIGH);
  delay(1000);
  digitalWrite(A2,HIGH);
  delay(1000);
  digitalWrite(10,HIGH);
  delay((3400));
  digitalWrite(5,LOW);
  digitalWrite(A4,LOW);
  digitalWrite(A3,LOW);
  digitalWrite(A2,LOW);
  digitalWrite(10,LOW);
  delay(1000);

//}

Share

    Recommendations

    • Clocks Contest

      Clocks Contest
    • Make it Move Contest

      Make it Move Contest
    • Woodworking Contest

      Woodworking Contest
    user

    We have a be nice policy.
    Please be positive and constructive.

    Tips

    Questions

    10 Comments

    Cool. it would help people if you described the circuit more. You could try Fritzing or you could just write in the connections.

    1 reply

    Thank you sir :)

    Yeah guys sorry we are working on the schematics.

    ETA 1 hour

    thanks for the comments

    1 reply

    the schematics are now available!!!!