forked from philipellisis/arduino-virtual-pinball-board
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Outputs.h
33 lines (28 loc) · 1.07 KB
/
Outputs.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
#ifndef OUTPUTS_H
#define OUTPUTS_H
#include <Arduino.h>
#include <Joystick.h>
#include <Adafruit_PWMServoDriver.h>
#include <Wire.h>
#include "Config.h"
class Outputs {
public:
Outputs();
void init(Config* config);
void updateOutput(byte outputId, byte outputValue);
void sendOutputState();
void checkResetOutputs();
void turnOff();
private:
Config* _config;
void updateOutputInternal(byte outputId, byte outputValue);
bool DEBUG = false;
byte numberOutputs = 15;
byte outputList[15] = {5,6,10,9,8,7,12,18,19,20,21,22,14,15,16};
byte outputValues[63] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
long int timeTurnedOn[63] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
void updateOutputActual(byte outputId, int outputValueStart, int outputValueFinish);
byte resetOutputNumber = 0;
byte virtualOutputOn[10] = {0,0,0,0,0,0,0,0,0,0};
};
#endif