Reference no: EM132196703
Question :
Write a c program, using the Arduino's integrated development environment (IDE), to simulate the Remote keyless entry control for the driver side door lock and the remote control parking with the following functions:
The door lock motor (simulated by a servo motor) locks and unlocks the driver side door with the following behavior:
The server motor starts at 0 degree to simulate the driver side door initially locked position.
The server motor rotates back-and-forth between 0 and 180 degrees to simulate the driver side door locked (0 degree) or unlocked (180 degree) positions.
The driver side door lock and unlock positions are controlled by an inferred remote control.
One button on the remote control can move the servomotor to the locked (0-degree) position. Another button on the remote control can move the servomotor to the unlocked (180-degree) position.
Use a stepper motor to simulate the movement of one car wheel during the remote control parking.
Rotate the stepper motor to one direction when the car is moving forward.
Rotate the stepper motor to the other direction when the car is moving backward.
Stop the stepper motor rotation when the car is not moving.
Use a distance sensor to sense objects within 30 cm. Use a red LED light to simulate the break light.
An inferred remote control is used to simulate the BMW 7 series key fob.
This project can be done by using any Inferred Remote control, as well as a smart phone with an inferred remote control app.
If you select to use a different remote control buttons than the specified SainSmart Remote Control buttons below to implement this project, you must demo this project in person.
Program the door to be unlocked (180-degree) by pressing the plus button on the SainSmart remote control.
Program the door to be locked (0-degree) by pressing the minus button on the SainSmart remote control.
If the door is already unlocked, receiving another door unlock signal should not move the servo motor.
If the door is already locked, receiving another door lock signal should not move the servo motor.
Program the stepper motor to rotate one direction when the forward button on the SainSmart remote control is pressed. However, while the forward button is pressed, if the distance sensor detects any object within 30 cm, turn on a red LED light to simulate the break light and stop the stepper motor rotation.
Program the stepper motor to rotate the other direction when the backward button on the SainSmart remote control is pressed. However, while the backward button is pressed, if the distance sensor detects any object within 30 cm, turn on a red LED light to simulate the break light and stop the stepper motor rotation.