Dependencies:
N5110
PowerControl
SRF02
beep
mbed
« Back to documentation index
main.h File Reference
Header file containing functions prototypes, defines and global variables.
More...
Go to the source code of this file.
Detailed Description
Header file containing functions prototypes, defines and global variables.
Reverse Parking Sensor
Author: Andreas Konstantinou
Date: April 2015
Definition in file main.h .
Function Documentation
Button1 Pressed.
This function sets the flag of button 1 to high
Definition at line 31 of file main.cpp .
Button2 Pressed.
This function sets the flag of button 2 to high
Definition at line 35 of file main.cpp .
Button3 Pressed.
This function sets the flag of button 3 to high
Definition at line 39 of file main.cpp .
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 .
Get Avegare distance.
This function gets the avegare distance of 5 values of the sensor
Definition at line 8 of file main.cpp .
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 .
Variable Documentation
a1 used to control the brightness of the LED background display by getting the value of the potentiometer1
Definition at line 214 of file main.h .
a2 used to control the frequency of the buzzer by getting the value of the potentiometer2
Definition at line 215 of file main.h .
buffer used to display characters on lcd, each character is 6 pixels wide, screen is 84 pixels (84/6 = 14maximum)
Definition at line 213 of file main.h .
button 1 flag set in ISR
Definition at line 209 of file main.h .
button 2 flag set in ISR
Definition at line 210 of file main.h .
button 3 flag set in ISR
Definition at line 211 of file main.h .
button 4 flag set in ISR
Definition at line 212 of file main.h .
this global variable used to get the average of 5 values of sensor
Definition at line 216 of file main.h .
Distance_Array used to store 5 values of the sensor
Definition at line 217 of file main.h .
time flag set in ISR
Definition at line 208 of file main.h .
timer flag green LED set in ISR
Definition at line 207 of file main.h .
timer flag red LED set in ISR
Definition at line 205 of file main.h .
timer flag yellow LED set in ISR
Definition at line 206 of file main.h .