|
|
@ -5,6 +5,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
/* ---------- Periodics ---------- */
|
|
|
|
/* ---------- Periodics ---------- */
|
|
|
|
// Flags
|
|
|
|
// Flags
|
|
|
|
|
|
|
|
bool T_1ms = false;
|
|
|
|
bool T_10ms = false;
|
|
|
|
bool T_10ms = false;
|
|
|
|
bool T_20ms = false;
|
|
|
|
bool T_20ms = false;
|
|
|
|
bool T_50ms = false;
|
|
|
|
bool T_50ms = false;
|
|
|
@ -18,6 +19,7 @@ bool T_5000ms = false;
|
|
|
|
// Datas
|
|
|
|
// Datas
|
|
|
|
int msCnt = 0;
|
|
|
|
int msCnt = 0;
|
|
|
|
unsigned long timer = 0;
|
|
|
|
unsigned long timer = 0;
|
|
|
|
|
|
|
|
#define AI_AVG_SIZE 20
|
|
|
|
|
|
|
|
|
|
|
|
/* ---------- Arduino Mega 2560 Basic IO ---------- */
|
|
|
|
/* ---------- Arduino Mega 2560 Basic IO ---------- */
|
|
|
|
// Pins
|
|
|
|
// Pins
|
|
|
@ -34,7 +36,7 @@ int Size_AI = 16;
|
|
|
|
|
|
|
|
|
|
|
|
int Values_DI; // digit values to a number
|
|
|
|
int Values_DI; // digit values to a number
|
|
|
|
int Values_AI[16];
|
|
|
|
int Values_AI[16];
|
|
|
|
int Recent_AI[16][10];
|
|
|
|
int Recent_AI[16][AI_AVG_SIZE];
|
|
|
|
|
|
|
|
|
|
|
|
/* ---------- I2C (Analog Output, DAC) ---------- */
|
|
|
|
/* ---------- I2C (Analog Output, DAC) ---------- */
|
|
|
|
// Addresses
|
|
|
|
// Addresses
|
|
|
|