6#define DEFAULT_SCALING true
7#define DEFAULT_MIN_READ 0
8#define DEFAULT_MAX_READ 4095
uint8_t readSensor(photoCell_t *sensor)
Reads the photocell value from ADC and updates the sensor state.
Definition photocell.c:51
void photoCell_init(photoCell_t *sensor, bool scaled, uint16_t min_value, uint16_t max_value)
Initializes a photoCell_t instance with the specified configuration.
Definition photocell.c:34
Definition photocell.h:10
uint8_t current_level
Definition photocell.h:14
uint16_t min_value
Definition photocell.h:12
uint16_t max_value
Definition photocell.h:13
uint16_t last_raw_value
Definition photocell.h:15
bool scaled
Definition photocell.h:11