Dependencies:
BMP180
N5110
mbed
« Back to documentation index
main.cpp File Reference
code implementation
More...
Go to the source code of this file.
Functions
void timerTExpired ()
timer associated with temperature
void timerPExpired ()
timer associated with pressure
void timerEExpired ()
timer associated with error
void timerLExpired ()
timer associated with light
void buttonPressed ()
function to set flag to 1 when button pressed
void error ()
function called when error occurs
void writeDataToFile (int data)
function to write data to file
void callTemp ()
function to call the temperature
void callPress ()
function to call pressure
void callLight ()
function to call light
void readTemp ()
function to reads temperature
void readPress ()
function to read pressure
void readLight ()
function to read light
void measurement ()
function to take BMP180 meaasurement
void tempGraph ()
function to plot temperature graph
void pressGraph ()
function to plot pressure graph
void lightGraph ()
function to plot light graph
void menu ()
function to display menu options
void clearCells ()
function to clear cells
int main ()
main function
Detailed Description
code implementation
Definition in file main.cpp .
Function Documentation
function to set flag to 1 when button pressed
Press Button; interrupt associated with left button; sets buttonFlag to one.
Definition at line 30 of file main.cpp .
function to call light
Calls Light; function reads the light from the LDR ; prints the current temperature to the screen.
Definition at line 85 of file main.cpp .
function to call pressure
Calls Pressure; function reads the pressure from the sensor; prints the current pressure to the screen.
Definition at line 71 of file main.cpp .
function to call the temperature
Calls Temperature; function reads the temperature from the sensor; prints the current temperature to the screen.
Definition at line 57 of file main.cpp .
function to clear cells
Clear Cells; cycle through pixels and set to zero.
Definition at line 335 of file main.cpp .
function called when error occurs
Error Function; function supplies error function; LED lights up every 2 seconds; buzzer goes off simultaneously with the LED.
Definition at line 34 of file main.cpp .
function to plot light graph
Light Graph; read light every 2 seconds; create temporary array; read light values into array; scale light array; plot array.
Definition at line 247 of file main.cpp .
function to take BMP180 meaasurement
Measurement; read measurement from sensor; set temperature; set pressure.
Definition at line 180 of file main.cpp .
function to display menu options
Menu; print temperature screen if potentiometer is greater than 2/3; print pressure screen if potentiometer is between 1/3 and 2/3; print light screen if potentiometer is less than 1/3.
Definition at line 277 of file main.cpp .
function to plot pressure graph
Pressure Graph; read pressure every 2 seconds; create temporary array; read pressure values into array; scale pressure array; plot array.
Definition at line 217 of file main.cpp .
function to read light
Read Light; calls callLight after 0.1 seconds; reads light every 60 seconds; prints light to screen; updates screen every 60 seconds with new light.
Definition at line 153 of file main.cpp .
function to read pressure
Read Pressure; calls callPress after 0.1 seconds; reads pressure every 30 minutes/1800 seconds; prints pressure to screen; updates screen every 30 minutes with new pressure.
Definition at line 126 of file main.cpp .
function to reads temperature
Read Temperature; calls callTemp after 0.1 seconds; reads temperature every 60 seconds; prints temperature to screen; updates screen every 60 seconds with new temperature.
Definition at line 99 of file main.cpp .
function to plot temperature graph
Temperature Graph; read temperature every 2 seconds; create temporary array; read temperature values into array; scale temperature array; plot array.
Definition at line 187 of file main.cpp .
timer associated with error
Expire Timer E; timer associated with error LED; sets timerEFlag to one.
Definition at line 22 of file main.cpp .
timer associated with light
Definition at line 26 of file main.cpp .
timer associated with pressure
Expire Timer P; timer associated with pressure; sets timerPFlag to one.
Definition at line 18 of file main.cpp .
timer associated with temperature
Expire Timer T; timer associated with temperature; sets timerTFlag to one.
Definition at line 14 of file main.cpp .
void writeDataToFile
(
int
data )
function to write data to file
Definition at line 48 of file main.cpp .