HELPP!!! ASAP PLEASE!! traffic light assignment borland c++

This is a discussion on HELPP!!! ASAP PLEASE!! traffic light assignment borland c++ within the C++ Programming forums, part of the General Programming Boards category; Hey guys im just new to c++ and ive been given an assignment which is a fair bit confusing, can ...

  1. #1
    Registered User
    Join Date
    Jun 2011
    Posts
    1

    HELPP!!! ASAP PLEASE!! traffic light assignment borland c++

    Hey guys im just new to c++ and ive been given an assignment which is a fair bit confusing, can some1 please help me out? mainly looking at the programing side of this assignment opposed to the actually physical testing on the work bench. im using borland c++ version 4.52.

    traffic light project

    1. develop write compile and test a c language program that will implement a simulated traffic light "t" intersection.
    2. the "t" intersection has two traffic lights (tl1, tl2) with a red, amber and green led each. the main road is tl1 and the side road (the vertical part of the "t" is tl2)
    3. a sensor (magnetic reed switch) in to be used on the side road.
    4. verify the operation of the leds and connections using a multimeter and test leads.
    5. wire up the board to the input/output board with the following connections. you can use the iotest program to verify the operation of the leds output and input
    input (one only) port a bit 0 - car detected
    outputs
    port b bit 0 - tl1 red
    port b bit 1 - tl1 amber
    port b bit 2 - tl1 green
    port b bit 3 - tl2 red
    port b bit 4 - tl2 amber
    port b bit 5 - tl2 green

    program operation
    tl1 (main road) is to remain at green with tl2 (side road) at red until a car arrives at the side road detector. after the car is detected for 10seconds tl1 will go amber for 2 seconds and then red. after tl1 has been at red for 2 seconds tl2 will change to green for 10 seconds, then go amber for 2 seconds and then red. after a further 2 seconds of tl2 at red, tl1 will go green and only then will the detection of cars at the side road be enabled for another cycle.

    7. fully document your program. use digi_o.obj subprogram for your input and outputs. the commands ...inA(), outB() are available. you will need to refresh the outputs of the leds after an input read.

    anything that i haven't outline or explained properly please ask me straight away

    cheers Billy Bob

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,538
    My questions are

    Did you read this -> Announcements - C++ Programming
    Or this -> Announcements - General Programming Boards

    And what have you done already, apart from running from class to the nearest web browser to dump your assignment for someone else to do.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Traffic light control
    By micro_ec in forum C Programming
    Replies: 4
    Last Post: 08-21-2010, 11:34 PM
  2. About Traffic light controller.
    By ovid in forum C++ Programming
    Replies: 4
    Last Post: 03-28-2010, 02:22 PM
  3. C++ helpp
    By nooneelse in forum C++ Programming
    Replies: 6
    Last Post: 09-13-2008, 05:55 PM
  4. helpp c programming assignment :(
    By robdiddy in forum C Programming
    Replies: 2
    Last Post: 04-27-2006, 07:15 AM
  5. helpp
    By Scarvenger in forum C++ Programming
    Replies: 3
    Last Post: 10-21-2005, 06:57 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21