School project.
Dependencies: Timezone NTPClient BSP_DISCO_F746NG Grove_temperature
main_functions.h@14:3ac7c08dbc52, 2021-01-18 (annotated)
- Committer:
- tuxx0046
- Date:
- Mon Jan 18 16:13:13 2021 +0000
- Revision:
- 14:3ac7c08dbc52
- Child:
- 15:638e65c37d58
Documentation updated.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
tuxx0046 | 14:3ac7c08dbc52 | 1 | /** |
tuxx0046 | 14:3ac7c08dbc52 | 2 | @file main_functions.h |
tuxx0046 | 14:3ac7c08dbc52 | 3 | @author Tu Tri Huynh |
tuxx0046 | 14:3ac7c08dbc52 | 4 | @date January 18, 2021 |
tuxx0046 | 14:3ac7c08dbc52 | 5 | @brief Functions to be envoked in main funtion. Will use global variables. |
tuxx0046 | 14:3ac7c08dbc52 | 6 | */ |
tuxx0046 | 14:3ac7c08dbc52 | 7 | |
tuxx0046 | 14:3ac7c08dbc52 | 8 | /** |
tuxx0046 | 14:3ac7c08dbc52 | 9 | This function will update the sensor readings. |
tuxx0046 | 14:3ac7c08dbc52 | 10 | 1/18/21 |
tuxx0046 | 14:3ac7c08dbc52 | 11 | */ |
tuxx0046 | 14:3ac7c08dbc52 | 12 | void update_readings() |
tuxx0046 | 14:3ac7c08dbc52 | 13 | { |
tuxx0046 | 14:3ac7c08dbc52 | 14 | light_sensor_reading = light_sensor.read(); |
tuxx0046 | 14:3ac7c08dbc52 | 15 | light_intensity = helper_get_sensor_read_in_percent(light_sensor_reading); |
tuxx0046 | 14:3ac7c08dbc52 | 16 | rotary_reading = rotary.read(); |
tuxx0046 | 14:3ac7c08dbc52 | 17 | rotary_setting = helper_get_sensor_read_in_percent(rotary_reading); |
tuxx0046 | 14:3ac7c08dbc52 | 18 | } |