control & programming the sports coupe mimic controlling the car alarm

5
Control & Control & Programming Programming The Sports Coupe Mimic The Sports Coupe Mimic Controlling Controlling the Car the Car Alarm Alarm

Upload: amberlynn-garrison

Post on 18-Jan-2018

216 views

Category:

Documents


0 download

DESCRIPTION

The Inputs and Outputs to Use Left Door (1) Right Door (2) Alarm On (3) Hazard Lights (2)

TRANSCRIPT

Page 1: Control & Programming The Sports Coupe Mimic Controlling the Car Alarm

Control & Control & ProgrammingProgramming

The Sports Coupe MimicThe Sports Coupe Mimic

Controlling Controlling the Car the Car AlarmAlarm

Page 2: Control & Programming The Sports Coupe Mimic Controlling the Car Alarm

The AlarmThe Alarm• Now you need to program the car Now you need to program the car

alarm.alarm.• When the alarm is turned on When the alarm is turned on

(Input 3) the hazard lights will (Input 3) the hazard lights will flash if either of the doors is open.flash if either of the doors is open.

• The hazards lights will continue to The hazards lights will continue to flash until both doors are closed.flash until both doors are closed.

Page 3: Control & Programming The Sports Coupe Mimic Controlling the Car Alarm

The Inputs and Outputs to UseThe Inputs and Outputs to Use

Left Door (1)Left Door (1)Right Door (2)Right Door (2)

Alarm On (3)Alarm On (3)

Hazard Lights (2)Hazard Lights (2)

Page 4: Control & Programming The Sports Coupe Mimic Controlling the Car Alarm

Designing the ProgramDesigning the Program

• You will need a main program and You will need a main program and a sub routine to make the hazard a sub routine to make the hazard lights flashlights flash

• You will need 3 decision boxes for You will need 3 decision boxes for Input 3, 1 and 2Input 3, 1 and 2

Page 5: Control & Programming The Sports Coupe Mimic Controlling the Car Alarm

The Main ProgramThe Main Program

• Check Input 3Check Input 3• If Input 3 is On then check Input 1 & 2If Input 3 is On then check Input 1 & 2• If Inputs 1 & 2 are on then flash the If Inputs 1 & 2 are on then flash the

hazards (run the sub routine)hazards (run the sub routine)• If Input 3 if Off then turn the hazards If Input 3 if Off then turn the hazards

offoff• LoopLoop