mirror of
https://gitlab.com/Luci_/arduino-photometrics.git
synced 2026-04-03 03:25:36 +02:00
31 lines
809 B
C++
31 lines
809 B
C++
#ifndef SENSORMANAGER_H
|
|
#define SENSORMANAGER_H
|
|
|
|
#include <Arduino.h>
|
|
#include "photoresistance_ohm_retrieval.h"
|
|
|
|
class SensorManager
|
|
{
|
|
private:
|
|
static const uint8_t max_sensor = 10;
|
|
static const bool unsigned_int = 0;
|
|
uint8_t nbPhotoSensor;
|
|
SensorOhm sensor_list[max_sensor];
|
|
int32_t min[max_sensor], max[max_sensor];
|
|
|
|
|
|
public:
|
|
SensorManager();
|
|
~SensorManager();
|
|
|
|
void setup(uint8_t nb_sensor, uint8_t *analog_in);
|
|
uint8_t get_nb_photores();
|
|
int32_t get_resistances_at(uint8_t index);
|
|
void get_resistances(int32_t* res_tab, uint8_t tab_lenght);
|
|
void get_min_max(int32_t* min_res_tab, int32_t* max_res_tab, uint8_t tab_lenght);
|
|
void updateMinMax(uint8_t index, int32_t current_res);
|
|
void print_current_res();
|
|
void print_min_max_res();
|
|
};
|
|
|
|
#endif |