TRAFFIC LIGHTS WITH INDUCTIVE PROXIMITY SENSORS

Your sensors don't come with a type number or so?

All traffic light have been merged into one (chaotic) thread.

likewaze:
We have tried programming but we are unsure of whether or not the process is actually correct. Below is our program:

/* This program demostrates how traffic is controlled on two lane access road leading to single lane road.
Software Developed by
Tom , Dick and Harry
.......
Hardware used
Arduino Uno (?)
Multicolored LED (?)
Inductive (?) sensors band X

*/
// assign traffic lights to line 1 I/O pins
int green1 = 11;
int yellow1 = 10;
int red1 = 9;
// assign traffic light to line 2 I/O pins
int green2 = 8;
int yellow2 = 7;
int red2 = 6;

float metalDetected;
int monitoring;
int MetalDetection = 1;

// assign sensors I/O pins
int s1 = 5; // line 1 entry sensor
int s2 = 4; // line 2 exit sensor
int s3 = 3;
int s4 = 2;

// lines "pass" counters

int line 1 entry counter =
int line 1 exit counter =

void setup() {
// put your setup code here, to run once:
Serial.begin(9600);

// assign I/O pins directions
pinMode(red, OUTPUT); // line 1 red LED as output
pinMode(yellow, OUTPUT); //. line 2 yellow LED as output
pinMode(green, OUTPUT);
pinMode(s1, INPUT); // line 1 entry sensor as Input , perhaps pulp input (?)
pinMode(s2, INPUT);
pinMode(s3, INPUT);
pinMode(s4, INPUT);

}

void loop() {
// put your main code here, to run repeatedly:

take a look at your flowchart - it is not what you want
and just add if (condition) here

start with checking line 1
if( line1 entry counter > x )
; temporary empty so it will compile

now check line 2
if(line1 entry counter 2 > x)
; temporary empty so it will compile

changeLights();
delay(15000) you will need to avoid delay - your "cars" will be arriving at random

}

void changeLights(){
//all reds are on the rest are off
they are not , this would describe the process better

turn all res on and ALL the other light off

digitalWrite(red1, HIGH);
digitalWrite(yellow1, LOW);
digitalWrite(green1, LOW);
digitalWrite(red2, HIGH);
digitalWrite(yellow2, LOW);
digitalWrite(egreen2, LOW);

OK it's a start.
Apparently you are working as a team.
So make sure your teammates have SOME clue what the program is about.
I did SOME annotation / comments to the code above.
Keep in mind that it is NOT code , just notes on what is going on
To keep you more interested , it is better to keep compiling code as you go and run it.
The actual functionality of the code is irrelevant as long as it compiles and it is easier to troubleshoot as you go adding more code instead of "cut and paste" and "watch for smoke ".