ELEC2645 (2015/16) / Mbed 2 deprecated Sensor_Project

Dependencies:   N5110 SRF02 mbed

Embed: (wiki syntax)

« Back to documentation index

main.h File Reference

main.h File Reference

Header file containing functions prototypes, defines and global variables. More...

Go to the source code of this file.

Namespaces

namespace  lcd
 

lcd connections


namespace  r_led1
 

r_led1 connections


namespace  r_led2
 

r_led2 connections


namespace  buzzer
 

buzzer connections


namespace  ticker
 

make led flashes at 2HZ


namespace  detect
 

make sensor detect at 2HZ


Functions

SRF02 sensor (PTE25, PTE24)
 namespace sensor
void timer_isr ()
 Setting LED flahses at 2 HZ.
void detect_isr ()
 Setting sensor detect at 2 HZ.
void drawCar (int x, int y)
 Drawing car at positon x and y.
void clearCar (int x, int y)
 Clear car at positon x and y.

Variables

volatile int g_timer_flag = 0
volatile int g_detect_timer_flag = 0
int distanceArray [10]

Detailed Description

Header file containing functions prototypes, defines and global variables.

Shows examples of creating Doxygen documentation. Revision 1.0.

Author:
XIN ZHANG
Date:
May 2016

Definition in file main.h.


Function Documentation

void clearCar ( int  x,
int  y 
)

Clear car at positon x and y.

Parameters:
x- clear the car at positon x
y- clear the car at positon y

Definition at line 219 of file main.cpp.

void detect_isr (  )

Setting sensor detect at 2 HZ.

Definition at line 185 of file main.cpp.

void drawCar ( int  x,
int  y 
)

Drawing car at positon x and y.

Parameters:
x- draw the car at positon x
y- draw the car at positon y

Definition at line 190 of file main.cpp.

SRF02 sensor ( PTE25  ,
PTE24   
)

namespace sensor

sensor connections

void timer_isr (  )

Setting LED flahses at 2 HZ.

Definition at line 180 of file main.cpp.


Variable Documentation

int distanceArray[10]

< Save car previous position Detect 10 times and add total distance in order to get mean vlaue

Definition at line 84 of file main.h.

volatile int g_detect_timer_flag = 0

Flag in detect-timer-isr

Definition at line 56 of file main.h.

volatile int g_timer_flag = 0

Flag in timer_isr

Definition at line 54 of file main.h.