School project.
Dependencies: Timezone NTPClient BSP_DISCO_F746NG Grove_temperature
Diff: helper_functions.h
- Revision:
- 8:1a1e7cf7dcb6
- Child:
- 10:137cf2c92871
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/helper_functions.h Thu Jan 14 12:41:37 2021 +0000 @@ -0,0 +1,15 @@ +/** +@file helper_functions.h +@brief Contains functions to help with general tasks +@author Tu Tri Huynh +@date 1/14/2021 +*/ + +/** +This function returns the percentage of AnalogIn sensor read values that by default are floating point numbers between 0.00 to 1.00. +1/14/2021 +*/ +int helper_get_sensor_read_in_percent(float read_value) +{ + return (int)(read_value*100); +} \ No newline at end of file