Hello, I am pretty new to the 'C' programming language and I have received a task to complete from school. If someone could help me or explain how to do I would be very great full.
Here is the task:
Toy Police Car Light System
You are a design engineer for LIGO, a construction toy manufacture. The company wants to place electronic modules into a new range of toys to help boost sales. Your management have set you the task of designing the software for a Police car light system which will be used in the Police Car model pack.
The electronic module consists of a toggle switch, a blue and a red LED and a low-cost microcontroller. The design brief requires that the blue and red LED's are lit alternately on a 1 second basis. The light sequence should be started and stopped using the toggle switch. In addition, management have requested that the software is portable so that it might be used on other modules with differing switch and LED arrangements. This WILL require the use of functions.
You are to use the CityBytes blue and red LED's to provide the Police car light sequence. The PORTB[*] dip-switch should be used as the toggle switch. The program MUST contain the following:
- LED and switch control implemented via function call.
- At least one conditional statement.
- An iterative loop.
To successfully complete this exercise you are required to produce a written report with the following:
- A Flow Chart or Algorithm documenting program operation.
- A Program listing incorporating the problem definition, your details and comments to show program functionality.
- A Test Plan with results recorded.