Mobile Security System - Revision 1.0
Dependencies: FXOS8700Q N5110 SDFileSystem SRF02 mbed
Diff: main.h
- Revision:
- 1:3ae4192d0c25
- Child:
- 2:e504a3cfe113
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.h Fri Mar 04 12:42:18 2016 +0000 @@ -0,0 +1,64 @@ +/** +@file main.h +@brief Header file containing functions prototypes, defines and global variables. +@brief Shows examples of creating Doxygen documentation. +@brief Revision 1.0. +@author Daniel Gibbons +@date March 2016 +*/ + +#ifndef MAIN_H +#define MAIN_H + +#define PI 3.14159265359 + +#include "mbed.h" +#include "N5110.h" +#include "SRF02.h" + +/** +@namespace srf02 +@brief SRF02 sensor object +@namespace pc +@brief UART connection for PC +@namespace r_led +@brief K64F on-board LEDs +@namespace g_led +@brief K64F on-board LEDs +@namespace b_led +@brief K64F on-board LEDs +@namespace sw2 +@brief K64F on-board switches +@namespace sw3 +@brief K64F on-board switches +*/ + +SRF02 srf02(I2C_SDA,I2C_SCL); +Serial pc(USBTX,USBRX); +DigitalOut r_led(LED_RED); +DigitalOut g_led(LED_GREEN); +DigitalOut b_led(LED_BLUE); +InterruptIn sw2(SW2); +InterruptIn sw3(SW3); + + +int distance; /*!< Stores the distance reading from SRF02 */ + + +/** +Hangs flashing on_board LED +*/ +void error(); + +/** +Set-up the serial port +*/ +void init_serial(); + +/** +Set-up the on-board LEDs and switches +*/ +void init_K64F(); + + +#endif \ No newline at end of file