School project.

Dependencies:   Timezone NTPClient BSP_DISCO_F746NG Grove_temperature

helper_functions.h

Committer:
tuxx0046
Date:
2021-01-15
Revision:
10:137cf2c92871
Parent:
8:1a1e7cf7dcb6
Child:
13:41debc0b9063

File content as of revision 10:137cf2c92871:

/**
@file    helper_functions.h
@author  Tu Tri Huynh
@date    January 14, 2021
@brief   Functions to help with general tasks.
*/

/**
This function returns the percentage of AnalogIn sensor read values that by default are floating point numbers between 0.00 to 1.00.
@read_value Float value from the read() function in analog units.
1/14/2021
*/
int helper_get_sensor_read_in_percent(float read_value)
{
    return (int)(read_value*100);
}