/
ModuleAnalogInput.h
36 lines (30 loc) · 980 Bytes
/
ModuleAnalogInput.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
/*
* +----------------------+
* | ModuleAnalogInput |
* |----------------------|
* | |
* | output >
* +----------------------+
*
*/
// =============================================================================
//
// ModuleAnalogInput is used for reading one of the analog inputs of the Arduino.
// The pin number of the input to be read is passed in the constructor. Pin
// numbers are defined in defines.h. Outputs a value ranging from 0 to 4095.
//
// You should never need to instantiate a ModuleAnalogInput yourself. All of
// the Equation Composer's input modules are created for you and stored in the
// Inputs (see Inputs.h/Inputs.cpp) object.
#ifndef ModuleAnalogInput_h
#define ModuleAnalogInput_h
#include "ModuleInput.h"
class ModuleAnalogInput : public ModuleInput
{
private:
uint16_t compute();
public:
ModuleAnalogInput(int input_pin);
uint32_t read();
};
#endif