Envorimental Monitoring
Loading...
Searching...
No Matches
main.h
Go to the documentation of this file.
1/* USER CODE BEGIN Header */
19/* USER CODE END Header */
20
21/* Define to prevent recursive inclusion -------------------------------------*/
22#ifndef __MAIN_H
23#define __MAIN_H
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
29/* Includes ------------------------------------------------------------------*/
30#include "stm32f4xx_hal.h"
31
32/* Private includes ----------------------------------------------------------*/
33/* USER CODE BEGIN Includes */
34#include "bmp180.h"
35#include "bh1750.h"
36#include "aht20.h"
37#include "ring_buffer.h"
38#include "filter.h"
39#include <math.h>
40#include <string.h>
41#include <stdio.h>
42/* USER CODE END Includes */
43
44/* Exported types ------------------------------------------------------------*/
45/* USER CODE BEGIN ET */
46typedef struct {
47 float min;
48 float max;
49 float median;
50 float std_dev;
52/* USER CODE END ET */
53
54/* Exported constants --------------------------------------------------------*/
55/* USER CODE BEGIN EC */
56
57/* USER CODE END EC */
58
59/* Exported macro ------------------------------------------------------------*/
60/* USER CODE BEGIN EM */
61
62/* USER CODE END EM */
63
64/* Exported functions prototypes ---------------------------------------------*/
65void Error_Handler(void);
66
67/* USER CODE BEGIN EFP */
75/* USER CODE END EFP */
76
77/* Private defines -----------------------------------------------------------*/
78#define LED_GREEN_Pin GPIO_PIN_12
79#define LED_GREEN_GPIO_Port GPIOD
80
81/* USER CODE BEGIN Private defines */
82
83/* USER CODE END Private defines */
84
85#ifdef __cplusplus
86}
87#endif
88
89#endif /* __MAIN_H */
Driver interface for the AHT20 humidity and temperature sensor.
Driver interface for the BH1750 ambient light sensor.
Driver interface for the BMP180 barometric pressure and temperature sensor.
Sliding-window median filter for floating-point sensor values.
void Error_Handler(void)
This function is executed in case of error occurrence.
Definition main.c:560
void calculate_statistics(buf_handle_t *p_handle, Sensor_Stats_t *stats)
Computes min, max, median, and standard deviation from a ring buffer.
Definition main.c:513
Circular (ring) buffer for float sensor samples.
Definition main.h:46
float std_dev
Definition main.h:50
float max
Definition main.h:48
float median
Definition main.h:49
float min
Definition main.h:47
Ring buffer control structure.
Definition ring_buffer.h:26