Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: MMA8452 N5110 PowerControl mbed
main.h File Reference
Header file containing functions prototypes and global variables. More...
Go to the source code of this file.
Namespaces | |
| namespace | lcd |
GPIO output for Nokia 5110 Display. | |
| namespace | mma8452 |
GPIO output for mma8452 accelerometer sensor. | |
| namespace | leds |
Debug leds. | |
| namespace | buzzer |
PWM for the buzzer. | |
| namespace | serial |
Serial interface. | |
| namespace | timer1 |
First timer used. | |
| namespace | timer2 |
Second timer used. | |
| namespace | timer3 |
Chronometer timer. | |
| namespace | local |
Create Local File System. | |
| namespace | I1 |
Create the interrupt for Transient Detection. | |
| namespace | I2 |
Create the interrupt for Pulse(Tap) Detection. | |
Functions | |
| 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. | |
Variables | |
| unsigned char | second = 0 |
| unsigned char | minute = 0 |
| unsigned char | hour = 0 |
| unsigned char | state = 0 |
| unsigned char | I1_flag = 0 |
| unsigned char | I2_flag = 0 |
| unsigned char | timerFlag1 = 0 |
| unsigned char | timerFlag2 = 0 |
| unsigned char | aux = 0 |
| char | Int_SourceSystem = 0 |
| char | Int_SourceTrans = 0 |
| unsigned char | length |
| char | buffer [14] |
| unsigned int | step = 0 |
| float | km = 0 |
| float | km_day [30] = {} |
| float | acc_vector = 0 |
| double | sub_x = 0 |
| double | sub_y = 0 |
| double | sub_z = 0 |
Detailed Description
Header file containing functions prototypes and global variables.
Implementation of a Pedometer using the accelerometer MMA8452Q, Nokia 5110 display and the mbed LPC1768. Revision 1.5.
- Date:
- May 2015
Definition in file main.h.
Function Documentation
| void error | ( | ) |
| void Interrupt | ( | ) |
| void Interrupt2 | ( | ) |
| void TimerExpired1 | ( | ) |
| void TimerExpired2 | ( | ) |
| void TimerExpired3 | ( | ) |
| void writeDataToFile | ( | char * | date, |
| int | data1, | ||
| float | data2 | ||
| ) |
Variable Documentation
| float acc_vector = 0 |
| unsigned char aux = 0 |
| char buffer[14] |
| unsigned char I1_flag = 0 |
| unsigned char I2_flag = 0 |
| char Int_SourceSystem = 0 |
| char Int_SourceTrans = 0 |
| float km_day[30] = {} |
| unsigned char length |
| unsigned char timerFlag1 = 0 |
| unsigned char timerFlag2 = 0 |
Generated on Sun Jul 24 2022 20:18:03 by
1.7.2