Dependencies:
N5110
SRF02
TMP102
mbed
« Back to documentation index
main.cpp File Reference
program implementation
More...
Go to the source code of this file.
Functions
float getDistance ()
method that will get the average of 10 distance measurements
void drawCar ()
Method that draws the car on the screen.
void reallyCloseDistance ()
Method that lets the user know the car is really close to an object.
void closeDistance ()
Method that lets the user know the car is close to an object.
void farDistance ()
Method that lets the user know the car far from an object.
void printBars ()
Method that prints the bars to show the user the obstacles distance.
void numericMode ()
Method that prints the distance and the temperature on the screen.
void introScreen ()
Sets up the intro screen.
void mainMenu ()
Sets up the main menu.
void peripheralsMenu ()
Sets up the peripherals menu.
void modesMenu ()
Sets up the modes menu.
void soundMenu ()
Sets up the sound menu.
void buzzerON ()
Sets the buzzers duty cycle to 50%.
void buzzerOFF ()
Sets the buzzers duty cycle to 0.
void LEDMenu ()
Sets up the LED menu.
void brightnessMenu ()
Sets up the brightness menu.
void nightMenu ()
Sets up the day/night menu.
void goToMainMenu ()
Simple function that will send the user back to the main menu whenever the bottom button is pressed.
void goToSelectedOption ()
Simple function that will send the user to a certain screen depending on what state it is.
void MenuLine1 ()
Scans the second bank of 6 and inverts all the pixels.
void MenuLine1Short ()
Scans the second bank of 6 and inverts some of the pixels.
void MenuLine2 ()
Scans the third bank of 6 and inverts all the pixels.
void MenuLine2Short ()
Scans the third bank of 6 and inverts some of the pixels.
void MenuLine3 ()
Scans the fourth bank of 6 and inverts all the pixels.
void MenuLine3Short ()
Scans the fourth bank of 6 and inverts some of the pixels.
void MenuLine4 ()
Scans the fifth bank of 6 and inverts all the pixels.
void MenuLine4Short ()
Scans the fifth bank of 6 and inverts some of the pixels.
void MenuLine5 ()
Scans the sixth bank of 6 and inverts all the pixels.
void MenuLine5Short ()
Scans the sixth bank of 6 and inverts some of the pixels.
void init_serial ()
Initialises serial communication.
void init_K64F ()
Initialises all the K64F's on board peripherals.
void timer_isr ()
Time triggered interrupt method.
void timer1_isr ()
Time triggered interrupt method.
void timer2_isr ()
Time triggered interrupt method.
void botButton_isr ()
Event triggered interrupt method.
void topButton_isr ()
Event triggered interrupt method.
Detailed Description
program implementation
Definition in file main.cpp .
Function Documentation
Event triggered interrupt method.
Definition at line 690 of file main.cpp .
Sets up the brightness menu.
The backlight led will go from a range of 0% to 100% brightness.
Definition at line 382 of file main.cpp .
Sets the buzzers duty cycle to 0.
Definition at line 343 of file main.cpp .
Sets the buzzers duty cycle to 50%.
Definition at line 338 of file main.cpp .
Method that lets the user know the car is close to an object.
Definition at line 75 of file main.cpp .
Method that draws the car on the screen.
Definition at line 55 of file main.cpp .
Method that lets the user know the car far from an object.
Definition at line 88 of file main.cpp .
method that will get the average of 10 distance measurements
Returns: Average of 10 distance measurements
Definition at line 39 of file main.cpp .
Simple function that will send the user back to the main menu whenever the bottom button is pressed.
Definition at line 466 of file main.cpp .
void goToSelectedOption
(
)
Simple function that will send the user to a certain screen depending on what state it is.
Definition at line 475 of file main.cpp .
Initialises all the K64F's on board peripherals.
Definition at line 650 of file main.cpp .
Initialises serial communication.
Definition at line 644 of file main.cpp .
Sets up the intro screen.
Displays the intro message
Definition at line 219 of file main.cpp .
Sets up the LED menu.
The led will either turn on at critical distances from an object or it won't
Definition at line 348 of file main.cpp .
Sets up the main menu.
Normalises potentiometer values to the highlighted bank of text in order to navigate the menus more easily
Definition at line 241 of file main.cpp .
Scans the second bank of 6 and inverts all the pixels.
Definition at line 485 of file main.cpp .
Scans the second bank of 6 and inverts some of the pixels.
Definition at line 501 of file main.cpp .
Scans the third bank of 6 and inverts all the pixels.
Definition at line 516 of file main.cpp .
Scans the third bank of 6 and inverts some of the pixels.
Definition at line 532 of file main.cpp .
Scans the fourth bank of 6 and inverts all the pixels.
Definition at line 548 of file main.cpp .
Scans the fourth bank of 6 and inverts some of the pixels.
Definition at line 564 of file main.cpp .
Scans the fifth bank of 6 and inverts all the pixels.
Definition at line 580 of file main.cpp .
Scans the fifth bank of 6 and inverts some of the pixels.
Definition at line 596 of file main.cpp .
Scans the sixth bank of 6 and inverts all the pixels.
Definition at line 612 of file main.cpp .
Scans the sixth bank of 6 and inverts some of the pixels.
Definition at line 628 of file main.cpp .
Sets up the modes menu.
The user will be able to use the parking sensor or a numerical value sensor that will indicate both temperature and distance.
Definition at line 288 of file main.cpp .
Sets up the day/night menu.
The lcd will change from normal mode to inverse mode when the user desires so
Definition at line 435 of file main.cpp .
Method that prints the distance and the temperature on the screen.
Definition at line 174 of file main.cpp .
Sets up the peripherals menu.
The peripherals are the LED and the buzzer
Definition at line 262 of file main.cpp .
Method that prints the bars to show the user the obstacles distance.
Definition at line 93 of file main.cpp .
void reallyCloseDistance
(
)
Method that lets the user know the car is really close to an object.
Definition at line 67 of file main.cpp .
Sets up the sound menu.
Either turn sound off or on
Definition at line 307 of file main.cpp .
Time triggered interrupt method.
Definition at line 676 of file main.cpp .
Time triggered interrupt method.
Definition at line 684 of file main.cpp .
Time triggered interrupt method.
Definition at line 670 of file main.cpp .
Event triggered interrupt method.
Definition at line 705 of file main.cpp .