Namespaces |
| namespace | SRF02 |
| | Ultra sonic distance sensor I2C mode SDA and SCL clock lines (no pull-up resitors required)
|
| namespace | TMP102 |
| | Temperature sensor I2C mode SDA and SCL clock lines (no pull-up resitors required)
|
| namespace | Upper_Button |
| | Interrupt button (top button)
|
| namespace | Lower_Button |
| | Interrupt button (bottom button)
|
| namespace | sw2 |
| | sw2 on the K64F
|
| namespace | sw3 |
| | sw3 on the K64F
|
| namespace | Potentiometer |
| | An analogue input.
|
| namespace | LCD |
| | LCD screen outputs.
|
| namespace | Screens_LED |
| | onboard LED on the nokia N5110 screen
|
| namespace | Buzzer |
| | PWM controlled buzzer that serves as sound alert.
|
| namespace | Warning_LED |
| | LED that will warn the user.
|
| namespace | red_led |
| | red LED on the K64F
|
| namespace | green_led |
| | green LED on the K64F
|
| namespace | blue_led |
| | blue LED on the K64F
|
| namespace | serial |
| | output serial for USB communication (debugging)
|
| namespace | sensorTicker |
| | Sensor ticker that will periodically call for distance and temperature measurements.
|
| namespace | buttonsDebounce |
| | Button Debounce ticker that will periodically call everytime a button has been pressed and will prevent multiple inputs from being recognised.
|
| namespace | potTicker |
| | Potetiometer ticker that will periodically call to check the position of the potentiometer.
|
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 | mediuDistance () |
| | Method that lets the user know the car is almost 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 | init_serial () |
| | Initialises serial communication.
|
| void | init_K64F () |
| | Initialises all the K64F's on board peripherals.
|
| void | buzzerOFF () |
| | Sets the buzzers duty cycle to 0.
|
| void | buzzerON () |
| | Sets the buzzers duty cycle to 50%.
|
|
Sets the functions of the ISR
|
| 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.
|
|
All the functions that set up the menus of the project
|
| 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 | introScreen () |
| | Sets up the intro screen.
|
| void | mainMenu () |
| | Sets up the main 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 | peripheralsMenu () |
| | Sets up the peripherals menu.
|
| void | modesMenu () |
| | Sets up the modes menu.
|
| void | soundMenu () |
| | Sets up the sound menu.
|
| void | LEDMenu () |
| | Sets up the LED menu.
|
| void | brightnessMenu () |
| | Sets up the brightness menu.
|
| void | nightMenu () |
| | Sets up the day/night menu.
|
Variables |
| float | distance |
| | Float that stores the average distance measurement from the getDistance function.
|
| float | dist |
| | Float that stores the average distance measurement to be used in the modes functions.
|
| float | T |
| | Float that stores the temperature measurement to be used in the modes functions.
|
| int | emptyVariable |
| | Integer that serves as an empty variable to store the distance average measurements.
|
| int | realDistance |
| | Integer that stores the distance measurements in cm from the distance sensor.
|
| int | temp |
| | Integer that stores the floored temperature measurement to be used in the parking mode function [printBars()].
|
| int | current_screen |
| | Integer that serves as an empty variable to store the current screen state.
|
| int | selected_option |
| | Integer that serves as an empty variable to store the selected option once an interrupt has occurred.
|
| int | led_state |
| | Integer that serves as an empty variable to store the LED state (either on or off)
|
| int | buzzer_state |
| | Integer that serves as an empty variable to store the buzzer state (either on or off)
|
| int | circle_position_SOUND = 27 |
| | Integer that stores the initial y value for the circles in the sound menu.
|
| int | circle_position_LED = 27 |
| | Integer that stores the initial y value for the circles in the LED menu.
|
| int | circle_position_brightness = 43 |
| | Integer that stores the initial y value for the circles in the brightness menu.
|
| int | circle_position_NIGHT = 27 |
| | Integer that stores the initial y value for the circles in the night menu.
|
| int | length1 |
| | Integer that stores the length of the distance string to be printed in the numeric mode.
|
| int | length2 |
| | Integer that stores the length of the temperature string to be printed in the numeric mode.
|
| char | buffer [14] |
| | Char that stores an array of characters to print the distance in the numeric mode.
|
| char | buffer2 [14] |
| | Char that stores an array of characters to print the temperature in the numeric mode and parking mode.
|
|
Constant integers used as unchangeable states for menu navigation and states of LED and buzzer
|
| const int | menu_state = 0 |
| | Constant integer that signals the menu state.
|
| const int | peripherals_state = 1 |
| | Constant integer that signals the peripherals state.
|
| const int | brightness_state = 2 |
| | Constant integer that signals the brightness state.
|
| const int | sound_state = 3 |
| | Constant integer that signals the sound menu state.
|
| const int | ledMenu_state = 4 |
| | Constant integer that signals the LED menu state.
|
| const int | nightMenu_state = 5 |
| | Constant integer that signals the night menu state.
|
| const int | modes_state = 6 |
| | Constant integer that signals the modes state state.
|
| const int | parkingMode_state = 7 |
| | Constant integer that signals the parking mode state.
|
| const int | numericMode_state = 8 |
| | Constant integer that signals the numeric mode state.
|
| const int | LEDON_state = 9 |
| | Constant integer that signals the LED is ON state.
|
| const int | LEDOFF_state = 10 |
| | Constant integer that signals the LED is OFF state.
|
| const int | buzzerON_state = 11 |
| | Constant integer that signals the buzzer is ON state.
|
| const int | buzzerOFF_state = 12 |
| | Constant integer that signals the buzzer is OFF state.
|
|
|
| volatile int | g_timer_flag = 0 |
| | Volatile integer that serves as a time triggered ISR for the sensor ticker.
|
| volatile int | g_timer1_flag = 0 |
| | Volatile integer that serves as a time triggered ISR for the button debouncer ticker.
|
| volatile int | g_timer2_flag = 0 |
| | Volatile integer that serves as a time triggered ISR for the potentiometer reading ticker.
|
| volatile int | g_topButton_flag = 0 |
| | Volatile integer that serves as an event triggered ISR for when the top button is pressed.
|
| volatile int | g_botButton_flag = 0 |
| | Volatile integer that serves as an event triggered ISR for when the bottom button is pressed.
|