joseph adamu / Mbed OS CW_final_thr

Fork of CW_copy by Calvin Kalintra

operation.h

Committer:
joseph_adamu
Date:
2018-01-10
Revision:
1:dc648c5624b9

File content as of revision 1:dc648c5624b9:

#include "mbed.h"
#include "putty.h"
int lcd_dis = 0;

int get;
Ticker pass;


//******** checking the lcd dispaly ***********

 void disp_check()
{ 
    while (1) {
        if(lcd_dis == 0)
        {
            lcd_dis = 1;
            }
        else
        {
            lcd_dis = 0;
        }
    }
}

//**** function to hold the sensor data and storing of the 120 past records
void dis_store_sensor_data()
{ 
    sensor_operation();
    records();
    
}

// function to hold the time_setting, date check and when the integer number is 1
// displays the sensor lcd function and day check  else if the integer value is 0
// displays the date and time 
void tick()
{
    ss++;
    time_rule();   
    day_check();
    lcd.cls();
    if (lcd_dis == 1)
    {
        sensor_lcd();
        dis_time();
    }
    
    else if (lcd_dis == 0)
    {
        dis_dates();
        dis_time();
    }
}