street light control in c code
#1

hello evryone,i wus like to receive a c code for the gsm based street light control system and some schematic diagrams if possible...thanks in advance Smile
Reply
#2

street light control in c code

Automatic control of street lights is deigned to turn on and turn of street lights automatically. This project check the amount of light. If light is 80 percent available, it automatically turn off street lights. But if amount of light is less than 80 percent, this project will automatically turn on street lights. one can also adjust it according to its requirement. Light sensor is used to detect intensity of light. PIC161F877A microcontroller is used interfaced with light sensor to sense amount of light available. Control signal is generated with the help of pic16f877a microcontroller after analyzing amount of light. Control signal generated by pic microcontroller is used to turn on transistor which in turn energize the relay coil and relay turn on the street light. I have used only one lamp in this project. Because this is just for demonstration purpose. To use it practically, you can use as many street lights as many you want to control through this automatic control of street lights.

#include<graphics.h>
#include<conio.h>
#include<dos.h>
#include<stdlib.h>

main()
{
int gd = DETECT, gm, midx, midy;

initgraph(&gd, &gm, "C:\\TC\\BGI");

midx = getmaxx()/2;
midy = getmaxy()/2;

setcolor(RED);
settextstyle(SCRIPT_FONT, HORIZ_DIR, 3);
settextjustify(CENTER_TEXT, CENTER_TEXT);
outtextxy(midx, midy-10, "Traffic Light Simulation");
outtextxy(midx, midy+10, "Press any key to start");
getch();
cleardevice();
setcolor(WHITE);
settextstyle(DEFAULT_FONT, HORIZ_DIR, 1);
rectangle(midx-30,midy-80,midx+30,midy+80);
circle(midx, midy-50, 22);
setfillstyle(SOLID_FILL,RED);
floodfill(midx, midy-50,WHITE);
setcolor(BLUE);
outtextxy(midx,midy-50,"STOP");
delay(2000);
graphdefaults();
cleardevice();
setcolor(WHITE);
rectangle(midx-30,midy-80,midx+30,midy+80);
circle(midx, midy, 20);
setfillstyle(SOLID_FILL,YELLOW);
floodfill(midx, midy,WHITE);
setcolor(BLUE);
outtextxy(midx-18,midy-3,"READY");

delay(2000);
cleardevice();
setcolor(WHITE);
rectangle(midx-30,midy-80,midx+30,midy+80);
circle(midx, midy+50, 22);
setfillstyle(SOLID_FILL,GREEN);
floodfill(midx, midy+50,WHITE);
setcolor(BLUE);
outtextxy(midx-7,midy+48,"GO");
setcolor(RED);
settextstyle(SCRIPT_FONT, HORIZ_DIR, 4);
outtextxy(midx-150, midy+100, "Press any key to exit...");

getch();
closegraph();
return 0;
}
Reply

Important Note..!

If you are not satisfied with above reply ,..Please

ASK HERE

So that we will collect data for you and will made reply to the request....OR try below "QUICK REPLY" box to add a reply to this page

[-]
Quick Reply
Message
Type your reply to this message here.

Image Verification
Please enter the text contained within the image into the text box below it. This process is used to prevent automated spam bots.
Image Verification
(case insensitive)

Possibly Related Threads...
Thread Author Replies Views Last Post
  block diagram of low cost automatic gate light with musical bell 1 7,270 06-10-2018, 05:46 AM
Last Post: Guest
  mba project inventory control of tata motors 1 3,549 20-03-2018, 10:50 AM
Last Post: Guest
  circuit diagram dc motor speed and direction control over gsm mobile modem pdf 2 15,078 19-03-2018, 10:57 AM
Last Post: Guest
Tongue ppt slides on sliding mode scheme for speed and current control of brushless dc bldc motor 7 2,572 16-01-2018, 11:41 AM
Last Post: dhanabhagya
  advanced control theory nagoor kani free download pdf 7 4,447 25-11-2017, 07:35 AM
Last Post: Guest
  literature review of an automatic room light controller with bi directional visitor counter 4 2,266 24-10-2017, 09:53 AM
Last Post: jaseela123d
  source code in matlab for fuzzy based traffic light controll system 2 1,329 08-10-2017, 02:12 PM
Last Post: nomanamjad143
  street light that glows on detecting vehicle movement pdf 3 1,205 13-09-2017, 09:57 PM
Last Post: Guest
  circuit diagram of street light glow on detecting vehicle movement 4 2,646 08-09-2017, 10:11 AM
Last Post: jaseela123d
  street light which glows on detecting vehicle movement circuit code 2 1,480 16-08-2017, 10:51 AM
Last Post: jaseela123d

Forum Jump: