-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPhotometer.h
53 lines (40 loc) · 1.07 KB
/
Photometer.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/* Photometer - A library for controlling LEDs and light voltage converters
* to sample solution characteristics.
*
* By: Michael Lindemuth
* University of South Florida
* College of Marine Science
*/
#ifndef PHOTOMETER_H
#define PHOTOMETER_H
#include <Arduino.h>
typedef void (* PinControlFunPtr) (int);
typedef int (* DetectorReadFunPtr) ();
struct PHOTOREADING{
float blue;
float green;
};
struct ABSREADING{
float Abs1;
float Abs2;
float R;
};
class Photometer{
private:
PinControlFunPtr blueLightControl, greenLightControl;
DetectorReadFunPtr detectorRead;
PHOTOREADING blank, sample;
ABSREADING absReading;
public:
Photometer(PinControlFunPtr blueLightControl, PinControlFunPtr greenLightControl, DetectorReadFunPtr detectorRead);
~Photometer();
void takeBlank();
void takeSample();
void setBlank(PHOTOREADING* src);
void resetBlank();
void getBlank(PHOTOREADING* dest);
void resetSample();
void getSample(PHOTOREADING* dest);
void getAbsorbance(ABSREADING* dest);
};
#endif