Edson Manoel da Silva / Mbed 2 deprecated Pedometer

Dependencies:   MMA8452 N5110 PowerControl mbed

Embed: (wiki syntax)

« Back to documentation index

main.cpp File Reference

main.cpp File Reference

Pedometer implementation using the sensor Triple Axis Accelerometer Breakout - MMA8452Q. More...

Go to the source code of this file.

Functions

int main ()
void Interrupt ()
 Set a flag to alert that a Transient Detection Interrupt has ocurred.
void Interrupt2 ()
 Set a flag to alert that a Pulse Detection Interrupt has ocurred.
void error ()
 Blind the LEDS for state machine error alert.
void TimerExpired1 ()
 Set a flag to alert that a Timer1 Interrupt has ocurred.
void TimerExpired2 ()
 Set a flag to alert that a Timer2 Interrupt has ocurred.
void TimerExpired3 ()
 Performs the calculation for the chronometer time.
void writeDataToFile (char *date, int data1, float data2)
 Saves the data collected in the stepping count to the flash disk.

Detailed Description

Pedometer implementation using the sensor Triple Axis Accelerometer Breakout - MMA8452Q.

Definition in file main.cpp.


Function Documentation

void error (  )

Blind the LEDS for state machine error alert.

Error function. In case of error of the state machine

Definition at line 313 of file main.cpp.

void Interrupt (  )

Set a flag to alert that a Transient Detection Interrupt has ocurred.

Controls the Transient Detection Interrupt flag

Definition at line 301 of file main.cpp.

void Interrupt2 (  )

Set a flag to alert that a Pulse Detection Interrupt has ocurred.

Controls the Pulse(Tap)Detection Interrupt flag

Definition at line 307 of file main.cpp.

int main (  )

Finite State Machine that cotrols the whole system

Definition at line 10 of file main.cpp.

void TimerExpired1 (  )

Set a flag to alert that a Timer1 Interrupt has ocurred.

Timer 1 flag

Definition at line 323 of file main.cpp.

void TimerExpired2 (  )

Set a flag to alert that a Timer2 Interrupt has ocurred.

Timer 2 Flag

Definition at line 329 of file main.cpp.

void TimerExpired3 (  )

Performs the calculation for the chronometer time.

Calculates the chronometer time

Definition at line 335 of file main.cpp.

void writeDataToFile ( char *  date,
int  data1,
float  data2 
)

Saves the data collected in the stepping count to the flash disk.

Parameters:
date- the date of the data
data1- steps
data2- Kilometer

Saves the km and steps data to flash disk

Definition at line 352 of file main.cpp.