Professional Documents
Culture Documents
Index:-: SR - No Title Page - No
Index:-: SR - No Title Page - No
INDEX :-
1 Introduction 2-3
2 Code 4-9
3 Cutput 10
4 Conclusion 11
VVIT,PAL 1
TRAFFIC SIGNAL
INTRODUCTION :-
Traffic lights are also named as stoplights, road traffic lamps, traffic
signals, stop-and-go lights which are signaling devices placed at road
crossings, everyday pedestrian crossings and other locations to
control competing flows of traffic. Traffic lights havebeen fixed
allover the world in many cities. Traffic light control assigns a right
way to the road users by using lights in normal colors (red –
amber/yellow – green)
VVIT,PAL 2
TRAFFIC SIGNAL
This traffic light control system can be further enhanced in such away
to control the traffic signals automatically based on the traffic density
on roads with the help of IR sensor modules with automatic turnoff if
there are no vehicles on either side of the roadwhich leads to power
consumption.
VVIT,PAL 3
TRAFFIC SIGNAL
CODE :-
void main()
{
clrscr();
// graphics mode
VVIT,PAL 4
TRAFFIC SIGNAL
midx = getmaxx() / 2;
midy = getmaxy() / 2;
setcolor(CYAN);
CENTER_TEXT);
getch();
cleardevice();
setcolor(WHITE);
VVIT,PAL 5
TRAFFIC SIGNAL
// rectangle lines
setfillstyle(SOLID_FILL, RED);
setcolor(BLUE);
// Delay of 2 sec
delay(2000);
graphdefaults();
cleardevice();
VVIT,PAL 6
TRAFFIC SIGNAL
setcolor(WHITE);
setfillstyle(SOLID_FILL, YELLOW);
setcolor(BLUE);
VVIT,PAL 7
TRAFFIC SIGNAL
cleardevice();
setcolor(WHITE);
setfillstyle(SOLID_FILL, GREEN);
setcolor(BLUE);
VVIT,PAL 8
TRAFFIC SIGNAL
setcolor(RED);
settextstyle(TRIPLEX_FONT,
HORIZ_DIR, 4);
"Brrrmmm");
getch();
VVIT,PAL 9
TRAFFIC SIGNAL
OUTPUT:-
VVIT,PAL 10
TRAFFIC SIGNAL
CONCLUSION:-
Light Options - As in any traffic signal you will see the three lights - red,
yellow and green. All the options has been implemented.
Vehicles - To keep the OpenGL Code simple for all only three vehicles has
been added. Though, if you like to add more do it, you are welcome.
Lanes - The right and left lane options is implemented in the program.
User Interactions - Both mouse and keyboard interaction has been added to the
OpenGL Code. All the user interactions has been listed in the post below.
There is options to speed up the traffic is also in the code.
This innovative software projects is an effective traffic signal management
project that allows for managing 4 way traffic signal management system. The
system consists of 4 signals corresponding to each road. We here propose a
density based traffic signal scheduling algorithm. The system is designed to
manage traffic signal timings based on the density of traffic on its corresponding
road. The system represents the traffic strength of a road graphically using
traffic judgments.
This innovative software projects is an effective traffic signal management
project that allows for managing 4 way traffic signal management system.
The system consists of 4 signals.
VVIT,PAL 11