Andreas Konstantinou / Mbed 2 deprecated ParkingSensor

Dependencies:   N5110 PowerControl SRF02 beep mbed

Embed: (wiki syntax)

« Back to documentation index

main.cpp File Reference

main.cpp File Reference

Reverse Parking Sensor Project. More...

Go to the source code of this file.

Functions

void Get_Average ()
 Get Avegare distance.
void button1_Pressed ()
 Button1 Pressed.
void button2_Pressed ()
 Button2 Pressed.
void button3_Pressed ()
 Button3 Pressed.
void button4_Pressed ()
 Button4 Pressed.
void Print_Time_Date ()
 Print Current Time and Date.
void timerExpired_red ()
 Timer Expired red led.
void timerExpired_yellow ()
 Timer Expired yellow led.
void timerExpired_green ()
 Timer Expired green led.
void buttonOperation_1 ()
 Check state of button 1.
void buttonOperation_2 ()
 Check state of button 2.
void buttonOperation_3 ()
 Check state of button 3.
void buttonOperation_4 ()
 Check state of button 4.
void ButtonsOperation ()
 Check states of the buttons.

Detailed Description

Reverse Parking Sensor Project.

Definition in file main.cpp.


Function Documentation

void button1_Pressed (  )

Button1 Pressed.

This function sets the flag of button 1 to high

Definition at line 31 of file main.cpp.

void button2_Pressed (  )

Button2 Pressed.

This function sets the flag of button 2 to high

Definition at line 35 of file main.cpp.

void button3_Pressed (  )

Button3 Pressed.

This function sets the flag of button 3 to high

Definition at line 39 of file main.cpp.

void button4_Pressed (  )

Button4 Pressed.

This function sets the flag of button 4 to high

Definition at line 43 of file main.cpp.

void buttonOperation_1 (  )

Check state of button 1.

This function checks the state of the button 1. if button1 is pressed then the leds and buzzer start blinking and making sound,repsectively, based on the measurements of the sensor

Definition at line 79 of file main.cpp.

void buttonOperation_2 (  )

Check state of button 2.

This functions checks the status of the button 2. if it is pressed then converts the units of the sensor's measurements from meters to centimeters and displays them on the lcd

Definition at line 158 of file main.cpp.

void buttonOperation_3 (  )

Check state of button 3.

This functions checks the status of the button 3. if it is pressed then a new pattern is showed in the lcd and displays the measured distance.

Definition at line 230 of file main.cpp.

void buttonOperation_4 (  )

Check state of button 4.

This functions checks the status of the button 4. if it is pressed then a new pattern is displayed on lcd and displays the sensor's measurements

Definition at line 440 of file main.cpp.

void ButtonsOperation (  )

Check states of the buttons.

This function checks the status between the buttons 2, 3, and 4 and based on the status of each one then executes the appropiate process

Definition at line 522 of file main.cpp.

void Get_Average (  )

Get Avegare distance.

This function gets the avegare distance of 5 values of the sensor

Definition at line 8 of file main.cpp.

void Print_Time_Date (  )

Print Current Time and Date.

This function sets the current time and date and prints them on the dispaly

Definition at line 48 of file main.cpp.

void timerExpired_green (  )

Timer Expired green led.

This function sets the flag of the green led to high

Definition at line 74 of file main.cpp.

void timerExpired_red (  )

Timer Expired red led.

This function sets the flag of the red led to high

Definition at line 64 of file main.cpp.

void timerExpired_yellow (  )

Timer Expired yellow led.

This function sets the flag of the yellow led to high

Definition at line 69 of file main.cpp.