-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathADDAC_GateDelay.h
executable file
·59 lines (40 loc) · 1.12 KB
/
ADDAC_GateDelay.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
54
55
56
57
58
59
/*
* ADDAC_GateDelay
*
* Developer's blank page Class example
*
* in Arduino environment simply add at the very top:
#include <ADDAC_GateDelay.h> // This loads the Class when compiling
ADDAC_GateDelay Empty; // This Instantiates 1 Class with the name "Empty"
*
*
* then in BEHAVIOUR() add at a position of your choice:
unsigned int CV = Empty.update(random(0, 65535));
or if you want to write it straight out at channel 1 for ex.:
VCC.WriteChannel(1, Empty.update(random(0, 65535)) );
*
*
* or to simply get the current value back use:
unsigned int CV = Empty.CVstream;
*
*
*/
#ifndef ADDAC_GateDelay_h
#define ADDAC_GateDelay_h
#if defined(ARDUINO) && ARDUINO >= 100
#include "Arduino.h"
#else
#include <WProgram.h>
#endif
#define addacMaxResolution 65535
class ADDAC_GateDelay{
public:
ADDAC_GateDelay();
long update(); // Function to be called from Arduino Environment
void GateDelayRise();
void GateDelayFall();
bool update(float _delay);
float time, timeFall, totalTime;
int state, oldState;
};
#endif