Project on automatic parking system

Hi everyone. I'm new in this platform. I have an issue regarding my final year project "automatic parking system".

1- I want to play an audio, example when a car approaches the parking gate it plays an audio like(Well come to the automated parking system, you can park at slot number one, thank you),
incase their is no available parking space an audio will played (well come to the automated parking system, sorry there is no available parking space, thank you).
2- I want to place an LED in front of the gate, so when a driver see a RED indicator it means their is no available parking space. While if he saw GREEN indicator means their is available parking space.
Please i want you to advise me, guide me, how to write such arduino code, circuit diagram and schematic diagram.

Thank you!!!

You appear to have a model of the car park and some hardware including an arduino uno, sensors and display with some data. So it looks like a lot of the development is already there. Now you are asking some basic question, say about integrating a led or sound. The led is trivial. Creating a custom audio message may require much more work and a Uno may not be ideal. You may be able to integrate an mp3 type player module/SD card reader with pre-formatted messages. I suppose the first activity is to create a schematic diagram of what is already there, if that does not yet exist, then understand the existing code.

have a look at the ISD4002 ChipCorder, single-chip record/playback device
you can record 2- to 4-minute messages to be played back as required

Edit: try a web search for arduino ISD1820

1 Like

You have asked for help to do something that you appear to already have done. Read the forum guide and post the bits that are missing to convey an understanding of your requirements

Yeah, i was ask to add speaker and LED on the project.

And what basic information about the project do you think you would need to do this work and why do you feel we wouldn’t need it?

How far have you got?
Show your working

2 Likes

Hi, @badisaidriss
Welcome to the forum.

Can you please post your code and a schematic of your project please, so we can see at what stage your progress is?

To add code please click this link;

Thanks.. Tom.. :smiley: :+1: :coffee: :australia:

1 Like

The basic information i need is, how to re-write the code that will play an audio, when a car approaches the gate, specify the available parking space and when there is no available parking space it should play an audio for that. I am playing the audio without SD card.

But, i know how to encode the audio and upload it to the arduino. Here is the source code

Please follow the advice given in the link below when posting code, in particular the section entitled 'Posting code and common code problems'

Use code tags (the </> icon above the compose window) to make it easier to read and copy for examination

Did you not read the advice when it was previously posted ?

Please read the Posting code and common code problems and edit your post #9 to enclose the whole code inside "code" tags.

#include <PCM.h>

#include <Servo.h>
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0*27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);

Servo myservo;

#define ir_enter 2
#define ir_back 4

#define ir_car1 5
#define ir_car2 6
#define ir_car3 7
#define ir_car4 8
#define ir_car5 9
#define ir_car6 10

int S1=0, S2=0, S3=0, S4=0, S5=0, S6=0;
int flag1=0, flag2=0;
int Slot = 6;

void setup(){
  Serial.begin(9600);
  
  pinMode(ir_car1, INPUT);
  pinMode(ir_car2, INPUT);
  pinMode(ir_car3, INPUT);
  pinMode(ir_car4, INPUT);
  pinMode(ir_car5, INPUT);
  pinMode(ir_car6, INPUT);

  pinMode(ir_enter, INPUT);
  pinMode(ir_back, INPUT);

  myservo.attach(3);
  myservo.write(90);

  lcd.begin(20, 4);
  lcd.setCursor(0, 1);
  lcd.print("   Car Parking  ");
  lcd.setCursor(0, 2);
  lcd.print("  System  ");
  delay(2000);
  lcd.clear();

  Read_Sensor();

  int total = S1+S2+S3+S4+S5+S6;
  Slot = Slot-total;
}

void loop(){
  Read_Sensor();

  lcd.setCursor(0,0);
  lcd.print("   Have Slot:   ");
  lcd.print(Slot);
  lcd.print("    ");

  lcd.setCursor(0,1);
  if(S1==1){lcd.print("S1:Fill ");}
  else{lcd.print("S1:Empty");}

  lcd.setCursor(10,1);
  if(S2==2){lcd.print("S2:Fill ");}
  else{lcd.print("S2:Empty");}

  lcd.setCursor(0,2);
  if(S3==3){lcd.print("S3:Fill ");}
  else{lcd.print("S3:Empty");}

  lcd.setCursor(10,2);
  if(S4==4){lcd.print("S4:Fill ");}
  else{lcd.print("S4:Empty");}

  lcd.setCursor(0,3);
  if(S5==5){lcd.print("S5:Fill ");}
  else{lcd.print("S5:Empty");}

  lcd.setCursor(10,3);
  if(S6==6){lcd.print("S6:Fill ");}
  else{lcd.print("S6:Empty");}

  if(digitalRead (ir_enter) == 0 && flag1==0){
    if(Slot>0){flag1=1;
    if(flag2==0){myservo.write(180); Slot = Slot-1;}
    }else{
      lcd.setCursor(0,0);
      lcd.print(" Sorry Parking Full ");
      delay(1500);
    }
  }

if(flag1==1 && flag2==1){
  delay(1000);
  myservo.write(90);
  flag1=0, flag2=0;
}

delay(1);
}

void Read_Sensor(){
  S1=0, S2=0, S3=0, S4=0, S5=0, S6=0;

  if(digitalRead(ir_car1) == 0){S1=1;}
  if(digitalRead(ir_car2) == 0){S2=1;}
  if(digitalRead(ir_car3) == 0){S3=1;}
  if(digitalRead(ir_car4) == 0){S4=1;}
  if(digitalRead(ir_car5) == 0){S5=1;}
  if(digitalRead(ir_car6) == 0){S6=1;}
}

Good, thanks. But for the next times, you don't need to delete the posts, just edit them by clicking on the "pencil" button below them. Deleted posts are still visible and if you do it several times you'll clog the topic. Thank you.

Nice frizzy picture but I have a hard time reading frizzys as they miss a lot of things and are a poor substitute for a schematic. An annotated schematic as asked for in post #6, that would save asking a lot of questions.

The sources of this project:

Why have you omitted that this images are not from your project?

I won't try to solve it with the needed information.

Good Luck!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.