#include <Wire.h>
#include <MCP23x17.h>
#include <MCP23017.h>
#include "flprogUtilites.h"
#include <LCD5110_Graph.h>
CMCP23017 _MCP2307_4;
CMCP23017 _MCP2307_5;
CMCP23017 _MCP2307_2;
CMCP23017 _MCP2307_3;
CMCP23017 _MCP2307_0;
CMCP23017 _MCP2307_1;
CMCP23017 _MCP2307_7;
CMCP23017 _MCP2307_6;
bool EN;
String Text1;
String Text2;
String Text3;
String Text4;
String Text5;
String Text6;
LCD5110 myGLCD(3 , 4 , 5 , 7 , 6);
extern uint8_t SmallFont[];
bool _MCP2307_4_O_IO1;
bool _MCP2307_4_O_IO2;
bool _MCP2307_4_O_IO3;
bool _MCP2307_4_O_IO4;
bool _MCP2307_4_O_IO5;
bool _MCP2307_4_O_IO6;
bool _MCP2307_4_O_IO7;
bool _MCP2307_4_O_IO8;
bool _MCP2307_4_O_IO9;
bool _MCP2307_4_O_IO10;
bool _MCP2307_4_O_IO11;
bool _MCP2307_4_O_IO12;
bool _MCP2307_4_O_IO13;
bool _MCP2307_4_O_IO14;
bool _MCP2307_4_O_IO15;
bool _MCP2307_4_O_IO16;
bool _MCP2307_5_O_IO1;
bool _MCP2307_5_O_IO2;
bool _MCP2307_5_O_IO3;
bool _MCP2307_5_O_IO4;
bool _MCP2307_5_O_IO5;
bool _MCP2307_5_O_IO6;
bool _MCP2307_5_O_IO7;
bool _MCP2307_5_O_IO8;
bool _MCP2307_5_O_IO9;
bool _MCP2307_5_O_IO10;
bool _MCP2307_5_O_IO11;
bool _MCP2307_5_O_IO12;
bool _MCP2307_5_O_IO13;
bool _MCP2307_5_O_IO14;
bool _MCP2307_5_O_IO15;
bool _MCP2307_5_O_IO16;
bool _MCP2307_2_O_IO1;
bool _MCP2307_2_O_IO2;
bool _MCP2307_2_O_IO3;
bool _MCP2307_2_O_IO4;
bool _MCP2307_2_O_IO5;
bool _MCP2307_2_O_IO6;
bool _MCP2307_2_O_IO7;
bool _MCP2307_2_O_IO8;
bool _MCP2307_2_O_IO9;
bool _MCP2307_2_O_IO10;
bool _MCP2307_2_O_IO11;
bool _MCP2307_2_O_IO12;
bool _MCP2307_2_O_IO13;
bool _MCP2307_2_O_IO14;
bool _MCP2307_2_O_IO15;
bool _MCP2307_2_O_IO16;
bool _MCP2307_3_O_IO1;
bool _MCP2307_3_O_IO2;
bool _MCP2307_3_O_IO3;
bool _MCP2307_3_O_IO4;
bool _MCP2307_3_O_IO5;
bool _MCP2307_3_O_IO6;
bool _MCP2307_3_O_IO7;
bool _MCP2307_3_O_IO8;
bool _MCP2307_3_O_IO9;
bool _MCP2307_3_O_IO10;
bool _MCP2307_3_O_IO11;
bool _MCP2307_3_O_IO12;
bool _MCP2307_3_O_IO13;
bool _MCP2307_3_O_IO14;
bool _MCP2307_3_O_IO15;
bool _MCP2307_3_O_IO16;
bool _MCP2307_0_O_IO1;
bool _MCP2307_0_O_IO2;
bool _MCP2307_0_O_IO3;
bool _MCP2307_0_O_IO4;
bool _MCP2307_0_O_IO5;
bool _MCP2307_0_O_IO6;
bool _MCP2307_0_O_IO7;
bool _MCP2307_0_O_IO8;
bool _MCP2307_0_O_IO9;
bool _MCP2307_0_O_IO10;
bool _MCP2307_0_O_IO11;
bool _MCP2307_0_O_IO12;
bool _MCP2307_0_O_IO13;
bool _MCP2307_0_O_IO14;
bool _MCP2307_0_O_IO15;
bool _MCP2307_0_O_IO16;
bool _MCP2307_1_O_IO1;
bool _MCP2307_1_O_IO2;
bool _MCP2307_1_O_IO3;
bool _MCP2307_1_O_IO4;
bool _MCP2307_1_O_IO5;
bool _MCP2307_1_O_IO6;
bool _MCP2307_1_O_IO7;
bool _MCP2307_1_O_IO8;
bool _MCP2307_1_O_IO9;
bool _MCP2307_1_O_IO10;
bool _MCP2307_1_O_IO11;
bool _MCP2307_1_O_IO12;
bool _MCP2307_1_O_IO13;
bool _MCP2307_1_O_IO14;
bool _MCP2307_1_O_IO15;
bool _MCP2307_1_O_IO16;
bool _MCP2307_7_O_IO1;
bool _MCP2307_7_O_IO2;
bool _MCP2307_7_O_IO3;
bool _MCP2307_7_O_IO4;
bool _MCP2307_7_O_IO5;
bool _MCP2307_7_O_IO6;
bool _MCP2307_7_O_IO7;
bool _MCP2307_7_O_IO8;
bool _MCP2307_7_O_IO9;
bool _MCP2307_7_O_IO10;
bool _MCP2307_7_O_IO11;
bool _MCP2307_7_O_IO12;
bool _MCP2307_7_O_IO13;
bool _MCP2307_7_O_IO14;
bool _MCP2307_7_O_IO15;
bool _MCP2307_7_O_IO16;
bool _MCP2307_6_O_IO1;
bool _MCP2307_6_O_IO2;
bool _MCP2307_6_O_IO3;
bool _MCP2307_6_O_IO4;
bool _MCP2307_6_O_IO5;
bool _MCP2307_6_O_IO6;
bool _MCP2307_6_O_IO7;
bool _MCP2307_6_O_IO8;
bool _MCP2307_6_O_IO9;
bool _MCP2307_6_O_IO10;
bool _MCP2307_6_O_IO11;
bool _MCP2307_6_O_IO12;
bool _MCP2307_6_O_IO13;
bool _MCP2307_6_O_IO14;
bool _MCP2307_6_O_IO15;
bool _MCP2307_6_O_IO16;
bool _gtv2;
bool _gen1I = 0;
bool _gen1O = 0;
unsigned long _gen1P = 0UL;
bool _gen2I = 0;
bool _gen2O = 0;
unsigned long _gen2P = 0UL;
bool _bounseInputD11S = 0;
bool _bounseInputD11O = 0;
unsigned long _bounseInputD11P = 0UL;
String _swi4;
String _Terminal_63920110;
String _swi6;
bool _trgr4 = 0;
bool _trgr1 = 0;
bool _Terminal_96845443;
bool _bounseInputD0S = 0;
bool _bounseInputD0O = 0;
unsigned long _bounseInputD0P = 0UL;
bool _trgr3 = 0;
bool _trgrt1 = 0;
bool _trgrt1I = 0;
bool _count2I = 0;
int _count2_Value = 0;
bool _bounseInputD12S = 0;
bool _bounseInputD12O = 0;
unsigned long _bounseInputD12P = 0UL;
bool _trgr2 = 0;
String _swi2;
int _inputNumber2_Out = 0;
String _swi3;
bool _gen4I = 0;
bool _gen4O = 0;
unsigned long _gen4P = 0UL;
bool _bounseInputD13S = 0;
bool _bounseInputD13O = 0;
unsigned long _bounseInputD13P = 0UL;
bool _dms2Q0 = 0;
bool _dms2Q1 = 0;
bool _dms2Q2 = 0;
bool _dms2Q3 = 0;
bool _dms2Q4 = 0;
bool _dms2Q5 = 0;
bool _dms2Q6 = 0;
bool _dms2Q7 = 0;
bool _dms2Q8 = 0;
bool _dms2Q9 = 0;
bool _dms2Q10 = 0;
bool _dms2Q11 = 0;
bool _dms2Q12 = 0;
bool _dms2Q13 = 0;
bool _dms2Q14 = 0;
bool _dms2Q15 = 0;
bool _dms2Q16 = 0;
bool _dms2Q17 = 0;
bool _dms2Q18 = 0;
bool _dms2Q19 = 0;
bool _dms2Q20 = 0;
bool _dms2Q21 = 0;
bool _dms2Q22 = 0;
bool _dms2Q23 = 0;
bool _dms2Q24 = 0;
bool _dms2Q25 = 0;
bool _dms2Q26 = 0;
bool _dms2Q27 = 0;
bool _dms2Q28 = 0;
bool _dms2Q29 = 0;
bool _dms2Q30 = 0;
bool _dms2Q31 = 0;
bool _dms2Q32 = 0;
bool _dms2Q33 = 0;
bool _dms2Q34 = 0;
bool _dms2Q35 = 0;
bool _dms2Q36 = 0;
bool _dms2Q37 = 0;
bool _dms2Q38 = 0;
bool _dms2Q39 = 0;
bool _dms2Q40 = 0;
bool _dms2Q41 = 0;
bool _dms2Q42 = 0;
bool _dms2Q43 = 0;
bool _dms2Q44 = 0;
bool _dms2Q45 = 0;
bool _dms2Q46 = 0;
bool _dms2Q47 = 0;
bool _dms2Q48 = 0;
bool _dms2Q49 = 0;
bool _dms2Q50 = 0;
bool _dms2Q51 = 0;
bool _dms2Q52 = 0;
bool _dms2Q53 = 0;
bool _dms2Q54 = 0;
bool _dms2Q55 = 0;
bool _dms2Q56 = 0;
bool _dms2Q57 = 0;
bool _dms2Q58 = 0;
bool _dms2Q59 = 0;
bool _dms2Q60 = 0;
bool _dms2Q61 = 0;
bool _dms2Q62 = 0;
bool _dms2Q63 = 0;
String _swi5;
bool _gen3I = 0;
bool _gen3O = 0;
unsigned long _gen3P = 0UL;
String _swi1;
void setup()
{
    pinMode(12, INPUT_PULLUP);
    pinMode(13, INPUT_PULLUP);
    pinMode(11, INPUT_PULLUP);
    pinMode(0, INPUT_PULLUP);
    pinMode(8, INPUT);
    pinMode(9, INPUT);
    pinMode(1, OUTPUT);
    digitalWrite(1, 0);
    pinMode(2, OUTPUT);
    digitalWrite(2, 0);
    Wire.begin();
    delay(10);
    _MCP2307_4.init(4);
    _MCP2307_4.pinMode(0, OUTPUT);
    _MCP2307_4.pinMode(1, OUTPUT);
    _MCP2307_4.pinMode(2, OUTPUT);
    _MCP2307_4.pinMode(3, OUTPUT);
    _MCP2307_4.pinMode(4, OUTPUT);
    _MCP2307_4.pinMode(5, OUTPUT);
    _MCP2307_4.pinMode(6, OUTPUT);
    _MCP2307_4.pinMode(7, OUTPUT);
    _MCP2307_4.pinMode(8, OUTPUT);
    _MCP2307_4.pinMode(9, OUTPUT);
    _MCP2307_4.pinMode(10, OUTPUT);
    _MCP2307_4.pinMode(11, OUTPUT);
    _MCP2307_4.pinMode(12, OUTPUT);
    _MCP2307_4.pinMode(13, OUTPUT);
    _MCP2307_4.pinMode(14, OUTPUT);
    _MCP2307_4.pinMode(15, OUTPUT);
    _MCP2307_5.init(5);
    _MCP2307_5.pinMode(0, OUTPUT);
    _MCP2307_5.pinMode(1, OUTPUT);
    _MCP2307_5.pinMode(2, OUTPUT);
    _MCP2307_5.pinMode(3, OUTPUT);
    _MCP2307_5.pinMode(4, OUTPUT);
    _MCP2307_5.pinMode(5, OUTPUT);
    _MCP2307_5.pinMode(6, OUTPUT);
    _MCP2307_5.pinMode(7, OUTPUT);
    _MCP2307_5.pinMode(8, OUTPUT);
    _MCP2307_5.pinMode(9, OUTPUT);
    _MCP2307_5.pinMode(10, OUTPUT);
    _MCP2307_5.pinMode(11, OUTPUT);
    _MCP2307_5.pinMode(12, OUTPUT);
    _MCP2307_5.pinMode(13, OUTPUT);
    _MCP2307_5.pinMode(14, OUTPUT);
    _MCP2307_5.pinMode(15, OUTPUT);
    _MCP2307_2.init(2);
    _MCP2307_2.pinMode(0, INPUT);
    _MCP2307_2.pinMode(1, INPUT);
    _MCP2307_2.pinMode(2, INPUT);
    _MCP2307_2.pinMode(3, INPUT);
    _MCP2307_2.pinMode(4, INPUT);
    _MCP2307_2.pinMode(5, INPUT);
    _MCP2307_2.pinMode(6, INPUT);
    _MCP2307_2.pinMode(7, INPUT);
    _MCP2307_2.pinMode(8, INPUT);
    _MCP2307_2.pinMode(9, INPUT);
    _MCP2307_2.pinMode(10, INPUT);
    _MCP2307_2.pinMode(11, INPUT);
    _MCP2307_2.pinMode(12, INPUT);
    _MCP2307_2.pinMode(13, INPUT);
    _MCP2307_2.pinMode(14, INPUT);
    _MCP2307_2.pinMode(15, INPUT);
    _MCP2307_3.init(3);
    _MCP2307_3.pinMode(0, OUTPUT);
    _MCP2307_3.pinMode(1, OUTPUT);
    _MCP2307_3.pinMode(2, OUTPUT);
    _MCP2307_3.pinMode(3, OUTPUT);
    _MCP2307_3.pinMode(4, OUTPUT);
    _MCP2307_3.pinMode(5, OUTPUT);
    _MCP2307_3.pinMode(6, OUTPUT);
    _MCP2307_3.pinMode(7, OUTPUT);
    _MCP2307_3.pinMode(8, OUTPUT);
    _MCP2307_3.pinMode(9, OUTPUT);
    _MCP2307_3.pinMode(10, OUTPUT);
    _MCP2307_3.pinMode(11, OUTPUT);
    _MCP2307_3.pinMode(12, OUTPUT);
    _MCP2307_3.pinMode(13, OUTPUT);
    _MCP2307_3.pinMode(14, OUTPUT);
    _MCP2307_3.pinMode(15, OUTPUT);
    _MCP2307_0.init(0);
    _MCP2307_0.pinMode(0, INPUT);
    _MCP2307_0.pinMode(1, INPUT);
    _MCP2307_0.pinMode(2, INPUT);
    _MCP2307_0.pinMode(3, INPUT);
    _MCP2307_0.pinMode(4, INPUT);
    _MCP2307_0.pinMode(5, INPUT);
    _MCP2307_0.pinMode(6, INPUT);
    _MCP2307_0.pinMode(7, INPUT);
    _MCP2307_0.pinMode(8, INPUT);
    _MCP2307_0.pinMode(9, INPUT);
    _MCP2307_0.pinMode(10, INPUT);
    _MCP2307_0.pinMode(11, INPUT);
    _MCP2307_0.pinMode(12, INPUT);
    _MCP2307_0.pinMode(13, INPUT);
    _MCP2307_0.pinMode(14, INPUT);
    _MCP2307_0.pinMode(15, INPUT);
    _MCP2307_1.init(1);
    _MCP2307_1.pinMode(0, INPUT);
    _MCP2307_1.pinMode(1, INPUT);
    _MCP2307_1.pinMode(2, INPUT);
    _MCP2307_1.pinMode(3, INPUT);
    _MCP2307_1.pinMode(4, INPUT);
    _MCP2307_1.pinMode(5, INPUT);
    _MCP2307_1.pinMode(6, INPUT);
    _MCP2307_1.pinMode(7, INPUT);
    _MCP2307_1.pinMode(8, INPUT);
    _MCP2307_1.pinMode(9, INPUT);
    _MCP2307_1.pinMode(10, INPUT);
    _MCP2307_1.pinMode(11, INPUT);
    _MCP2307_1.pinMode(12, INPUT);
    _MCP2307_1.pinMode(13, INPUT);
    _MCP2307_1.pinMode(14, INPUT);
    _MCP2307_1.pinMode(15, INPUT);
    _MCP2307_7.init(7);
    _MCP2307_7.pinMode(0, INPUT);
    _MCP2307_7.pinMode(1, INPUT);
    _MCP2307_7.pinMode(2, INPUT);
    _MCP2307_7.pinMode(3, INPUT);
    _MCP2307_7.pinMode(4, INPUT);
    _MCP2307_7.pinMode(5, INPUT);
    _MCP2307_7.pinMode(6, INPUT);
    _MCP2307_7.pinMode(7, INPUT);
    _MCP2307_7.pinMode(8, INPUT);
    _MCP2307_7.pinMode(9, INPUT);
    _MCP2307_7.pinMode(10, INPUT);
    _MCP2307_7.pinMode(11, INPUT);
    _MCP2307_7.pinMode(12, INPUT);
    _MCP2307_7.pinMode(13, INPUT);
    _MCP2307_7.pinMode(14, INPUT);
    _MCP2307_7.pinMode(15, INPUT);
    _MCP2307_6.init(6);
    _MCP2307_6.pinMode(0, OUTPUT);
    _MCP2307_6.pinMode(1, OUTPUT);
    _MCP2307_6.pinMode(2, OUTPUT);
    _MCP2307_6.pinMode(3, OUTPUT);
    _MCP2307_6.pinMode(4, OUTPUT);
    _MCP2307_6.pinMode(5, OUTPUT);
    _MCP2307_6.pinMode(6, OUTPUT);
    _MCP2307_6.pinMode(7, OUTPUT);
    _MCP2307_6.pinMode(8, OUTPUT);
    _MCP2307_6.pinMode(9, OUTPUT);
    _MCP2307_6.pinMode(10, OUTPUT);
    _MCP2307_6.pinMode(11, OUTPUT);
    _MCP2307_6.pinMode(12, OUTPUT);
    _MCP2307_6.pinMode(13, OUTPUT);
    _MCP2307_6.pinMode(14, OUTPUT);
    _MCP2307_6.pinMode(15, OUTPUT);
    _bounseInputD13O =    digitalRead(13);
    _bounseInputD0O =    digitalRead(0);
    _bounseInputD12O =    digitalRead(12);
    _bounseInputD11O =    digitalRead(11);
    myGLCD.InitLCD(70);
    myGLCD.setFont(SmallFont);
}
void loop()
{
    _MCP2307_2_O_IO1 = _MCP2307_2.digitalRead(0);
    _MCP2307_2_O_IO2 = _MCP2307_2.digitalRead(1);
    _MCP2307_2_O_IO3 = _MCP2307_2.digitalRead(2);
    _MCP2307_2_O_IO4 = _MCP2307_2.digitalRead(3);
    _MCP2307_2_O_IO5 = _MCP2307_2.digitalRead(4);
    _MCP2307_2_O_IO6 = _MCP2307_2.digitalRead(5);
    _MCP2307_2_O_IO7 = _MCP2307_2.digitalRead(6);
    _MCP2307_2_O_IO8 = _MCP2307_2.digitalRead(7);
    _MCP2307_2_O_IO9 = _MCP2307_2.digitalRead(8);
    _MCP2307_2_O_IO10 = _MCP2307_2.digitalRead(9);
    _MCP2307_2_O_IO11 = _MCP2307_2.digitalRead(10);
    _MCP2307_2_O_IO12 = _MCP2307_2.digitalRead(11);
    _MCP2307_2_O_IO13 = _MCP2307_2.digitalRead(12);
    _MCP2307_2_O_IO14 = _MCP2307_2.digitalRead(13);
    _MCP2307_2_O_IO15 = _MCP2307_2.digitalRead(14);
    _MCP2307_2_O_IO16 = _MCP2307_2.digitalRead(15);
    _MCP2307_0_O_IO1 = _MCP2307_0.digitalRead(0);
    _MCP2307_0_O_IO2 = _MCP2307_0.digitalRead(1);
    _MCP2307_0_O_IO3 = _MCP2307_0.digitalRead(2);
    _MCP2307_0_O_IO4 = _MCP2307_0.digitalRead(3);
    _MCP2307_0_O_IO5 = _MCP2307_0.digitalRead(4);
    _MCP2307_0_O_IO6 = _MCP2307_0.digitalRead(5);
    _MCP2307_0_O_IO7 = _MCP2307_0.digitalRead(6);
    _MCP2307_0_O_IO8 = _MCP2307_0.digitalRead(7);
    _MCP2307_0_O_IO9 = _MCP2307_0.digitalRead(8);
    _MCP2307_0_O_IO10 = _MCP2307_0.digitalRead(9);
    _MCP2307_0_O_IO11 = _MCP2307_0.digitalRead(10);
    _MCP2307_0_O_IO12 = _MCP2307_0.digitalRead(11);
    _MCP2307_0_O_IO13 = _MCP2307_0.digitalRead(12);
    _MCP2307_0_O_IO14 = _MCP2307_0.digitalRead(13);
    _MCP2307_0_O_IO15 = _MCP2307_0.digitalRead(14);
    _MCP2307_0_O_IO16 = _MCP2307_0.digitalRead(15);
    _MCP2307_1_O_IO1 = _MCP2307_1.digitalRead(0);
    _MCP2307_1_O_IO2 = _MCP2307_1.digitalRead(1);
    _MCP2307_1_O_IO3 = _MCP2307_1.digitalRead(2);
    _MCP2307_1_O_IO4 = _MCP2307_1.digitalRead(3);
    _MCP2307_1_O_IO5 = _MCP2307_1.digitalRead(4);
    _MCP2307_1_O_IO6 = _MCP2307_1.digitalRead(5);
    _MCP2307_1_O_IO7 = _MCP2307_1.digitalRead(6);
    _MCP2307_1_O_IO8 = _MCP2307_1.digitalRead(7);
    _MCP2307_1_O_IO9 = _MCP2307_1.digitalRead(8);
    _MCP2307_1_O_IO10 = _MCP2307_1.digitalRead(9);
    _MCP2307_1_O_IO11 = _MCP2307_1.digitalRead(10);
    _MCP2307_1_O_IO12 = _MCP2307_1.digitalRead(11);
    _MCP2307_1_O_IO13 = _MCP2307_1.digitalRead(12);
    _MCP2307_1_O_IO14 = _MCP2307_1.digitalRead(13);
    _MCP2307_1_O_IO15 = _MCP2307_1.digitalRead(14);
    _MCP2307_1_O_IO16 = _MCP2307_1.digitalRead(15);
    _MCP2307_7_O_IO1 = _MCP2307_7.digitalRead(0);
    _MCP2307_7_O_IO2 = _MCP2307_7.digitalRead(1);
    _MCP2307_7_O_IO3 = _MCP2307_7.digitalRead(2);
    _MCP2307_7_O_IO4 = _MCP2307_7.digitalRead(3);
    _MCP2307_7_O_IO5 = _MCP2307_7.digitalRead(4);
    _MCP2307_7_O_IO6 = _MCP2307_7.digitalRead(5);
    _MCP2307_7_O_IO7 = _MCP2307_7.digitalRead(6);
    _MCP2307_7_O_IO8 = _MCP2307_7.digitalRead(7);
    _MCP2307_7_O_IO9 = _MCP2307_7.digitalRead(8);
    _MCP2307_7_O_IO10 = _MCP2307_7.digitalRead(9);
    _MCP2307_7_O_IO11 = _MCP2307_7.digitalRead(10);
    _MCP2307_7_O_IO12 = _MCP2307_7.digitalRead(11);
    _MCP2307_7_O_IO13 = _MCP2307_7.digitalRead(12);
    _MCP2307_7_O_IO14 = _MCP2307_7.digitalRead(13);
    _MCP2307_7_O_IO15 = _MCP2307_7.digitalRead(14);
    _MCP2307_7_O_IO16 = _MCP2307_7.digitalRead(15);
    bool  _bounceInputTmpD13 =  (digitalRead (13));
    if (_bounseInputD13S)
    {
        if (millis() >= (_bounseInputD13P + 40))
        {
            _bounseInputD13O= _bounceInputTmpD13;
            _bounseInputD13S=0;
        }
    }
    else
    {
        if (_bounceInputTmpD13 != _bounseInputD13O)
        {
            _bounseInputD13S=1;
            _bounseInputD13P = millis();
        }
    }
    bool  _bounceInputTmpD0 =  (digitalRead (0));
    if (_bounseInputD0S)
    {
        if (millis() >= (_bounseInputD0P + 40))
        {
            _bounseInputD0O= _bounceInputTmpD0;
            _bounseInputD0S=0;
        }
    }
    else
    {
        if (_bounceInputTmpD0 != _bounseInputD0O)
        {
            _bounseInputD0S=1;
            _bounseInputD0P = millis();
        }
    }
    bool  _bounceInputTmpD12 =  (digitalRead (12));
    if (_bounseInputD12S)
    {
        if (millis() >= (_bounseInputD12P + 40))
        {
            _bounseInputD12O= _bounceInputTmpD12;
            _bounseInputD12S=0;
        }
    }
    else
    {
        if (_bounceInputTmpD12 != _bounseInputD12O)
        {
            _bounseInputD12S=1;
            _bounseInputD12P = millis();
        }
    }
    bool  _bounceInputTmpD11 =  (digitalRead (11));
    if (_bounseInputD11S)
    {
        if (millis() >= (_bounseInputD11P + 40))
        {
            _bounseInputD11O= _bounceInputTmpD11;
            _bounseInputD11S=0;
        }
    }
    else
    {
        if (_bounceInputTmpD11 != _bounseInputD11O)
        {
            _bounseInputD11S=1;
            _bounseInputD11P = millis();
        }
    }
    //Плата:1
//Наименование:УПРАВЛЕНИЕ СКАНИРОВАНИЕМ И ИНДИКАЦИЯ
    if (!(0)) 
    {
         if (_trgrt1I) 
        {
             _trgrt1 = 0;
        }
         else 
        {
            _trgrt1 = 1;
            _trgrt1I = 1;
        }
    }
     else 
    {
        _trgrt1 = 0;
        _trgrt1I = 0;
    }
    ;
    if(_trgrt1) _trgr4 = 0;
    if(!(_bounseInputD13O)) _trgr4 = 1;
    if(_trgrt1) _trgr1 = 0;
    if(!(_bounseInputD13O)) _trgr1 = 1;
    if (((((!(_bounseInputD12O)) || (_gtv2))) && (_trgr1))) 
    {
         if (! _gen3I) 
        {
            _gen3I = 1;
            _gen3O = 1;
            _gen3P = millis();
        }
    }
     else 
    {
        _gen3I = 0 ;
        _gen3O= 0;
    }
    if (_gen3I) 
    {
          if (flprog::isTimer (_gen3P , 300)) 
        {
             _gen3P = millis();
            _gen3O = ! _gen3O;
        }
    }
    if (!(_bounseInputD11O))
    {
        _count2_Value = 0;
    }
     else 
    {
        if (((_gen3O) && (_trgr4)))
        {
            if (! _count2I) 
            {
                _count2I = 1;
                if(_count2_Value < 64) 
                {
                    _count2_Value = _count2_Value + 1;
                }
            }
        }
         else 
        {
            _count2I = 0;
        }
    }
    if(_trgr4)
    {
        _swi1=((String("ВХОД ")) + ((String((_count2_Value)+(1), DEC))));
    }
    else
    {
        _swi1=String("НАЖМИТЕ TEST");
    }
    if(_Terminal_96845443)
    {
        _swi2=String("БАТАРЕЯ");
    }
    else
    {
        _swi2=_swi1;
    }
    _gtv2 = (((String((_count2_Value)+(1), DEC))).equals((String(_inputNumber2_Out, DEC))));
    digitalWrite(1, (((String((_count2_Value)+(1), DEC))).equals((String(_inputNumber2_Out, DEC)))));
    if((((String(_inputNumber2_Out, DEC))).equals(String("0"))))
    {
        _swi3=String("ОБРЫВ");
    }
    else
    {
        _swi3=((String("ВЫХОД ")) + ((String(_inputNumber2_Out, DEC))));
    }
    if(_Terminal_96845443)
    {
        _swi4=String("РАЗРЯЖНЕНА");
    }
    else
    {
        _swi4=_swi3;
    }
    if ((digitalRead (8))) 
    {
        if (! _gen2I)
        {
            _gen2I = 1;
            _gen2O = 1;
            _gen2P = millis();
        }
    }
     else 
    {
        _gen2I = 0 ;
        _gen2O= 0;
    }
     if (_gen2I &&  _gen2O)   _gen2O = !(flprog::isTimer(_gen2P , 100));
    if ((digitalRead (9))) 
    {
        if (! _gen4I)
        {
            _gen4I = 1;
            _gen4O = 1;
            _gen4P = millis();
        }
    }
     else 
    {
        _gen4I = 0 ;
        _gen4O= 0;
    }
     if (_gen4I &&  _gen4O)   _gen4O = !(flprog::isTimer(_gen4P , 100));
    if(_gen4O) _trgr3 = 0;
    if(_gen2O) _trgr3 = 1;
    if(_trgr3)
    {
        _swi5=String("IDC КАБЕЛЬ");
    }
    else
    {
        _swi5=String("DSUB КАБЕЛЬ");
    }
    if(_trgr4)
    {
        _swi6=_swi5;
    }
    else
    {
        _swi6=String("");
    }
    EN = !(0);
    Text1 = _swi2;
    Text2 = _swi4;
    Text3 = _swi6;
    Text4 = String("");
    Text5 = _Terminal_63920110;
    Text6 = String("");
    if (EN==1)
    {
        myGLCD.clrScr();
        myGLCD.print (utf8rus (Text1), 0, 0);
        myGLCD.print (utf8rus (Text2), 0, 8);
        myGLCD.print (utf8rus (Text3), 0, 16);
        myGLCD.print (utf8rus (Text4), 0, 24);
        myGLCD.print (utf8rus (Text5), 0, 32);
        myGLCD.print (utf8rus (Text6), 0, 40);
        myGLCD.update ();
    }
    else
    {
        myGLCD.clrScr();
    }
    //Плата:2
//Наименование:СКАНИРОВАНИЕ ЖИЛ
    if((_count2_Value == 0))
    {
        _dms2Q0 = 1;
    }
    else 
    {
        _dms2Q0 = 0;
    }
    if((_count2_Value == 1))
    {
        _dms2Q1 = 1;
    }
    else 
    {
        _dms2Q1 = 0;
    }
    if((_count2_Value == 2))
    {
        _dms2Q2 = 1;
    }
    else 
    {
        _dms2Q2 = 0;
    }
    if((_count2_Value == 3))
    {
        _dms2Q3 = 1;
    }
    else 
    {
        _dms2Q3 = 0;
    }
    if((_count2_Value == 4))
    {
        _dms2Q4 = 1;
    }
    else 
    {
        _dms2Q4 = 0;
    }
    if((_count2_Value == 5))
    {
        _dms2Q5 = 1;
    }
    else 
    {
        _dms2Q5 = 0;
    }
    if((_count2_Value == 6))
    {
        _dms2Q6 = 1;
    }
    else 
    {
        _dms2Q6 = 0;
    }
    if((_count2_Value == 7))
    {
        _dms2Q7 = 1;
    }
    else 
    {
        _dms2Q7 = 0;
    }
    if((_count2_Value == 8))
    {
        _dms2Q8 = 1;
    }
    else 
    {
        _dms2Q8 = 0;
    }
    if((_count2_Value == 9))
    {
        _dms2Q9 = 1;
    }
    else 
    {
        _dms2Q9 = 0;
    }
    if((_count2_Value == 10))
    {
        _dms2Q10 = 1;
    }
    else 
    {
        _dms2Q10 = 0;
    }
    if((_count2_Value == 11))
    {
        _dms2Q11 = 1;
    }
    else 
    {
        _dms2Q11 = 0;
    }
    if((_count2_Value == 12))
    {
        _dms2Q12 = 1;
    }
    else 
    {
        _dms2Q12 = 0;
    }
    if((_count2_Value == 13))
    {
        _dms2Q13 = 1;
    }
    else 
    {
        _dms2Q13 = 0;
    }
    if((_count2_Value == 14))
    {
        _dms2Q14 = 1;
    }
    else 
    {
        _dms2Q14 = 0;
    }
    if((_count2_Value == 15))
    {
        _dms2Q15 = 1;
    }
    else 
    {
        _dms2Q15 = 0;
    }
    if((_count2_Value == 16))
    {
        _dms2Q16 = 1;
    }
    else 
    {
        _dms2Q16 = 0;
    }
    if((_count2_Value == 17))
    {
        _dms2Q17 = 1;
    }
    else 
    {
        _dms2Q17 = 0;
    }
    if((_count2_Value == 18))
    {
        _dms2Q18 = 1;
    }
    else 
    {
        _dms2Q18 = 0;
    }
    if((_count2_Value == 19))
    {
        _dms2Q19 = 1;
    }
    else 
    {
        _dms2Q19 = 0;
    }
    if((_count2_Value == 20))
    {
        _dms2Q20 = 1;
    }
    else 
    {
        _dms2Q20 = 0;
    }
    if((_count2_Value == 21))
    {
        _dms2Q21 = 1;
    }
    else 
    {
        _dms2Q21 = 0;
    }
    if((_count2_Value == 22))
    {
        _dms2Q22 = 1;
    }
    else 
    {
        _dms2Q22 = 0;
    }
    if((_count2_Value == 23))
    {
        _dms2Q23 = 1;
    }
    else 
    {
        _dms2Q23 = 0;
    }
    if((_count2_Value == 24))
    {
        _dms2Q24 = 1;
    }
    else 
    {
        _dms2Q24 = 0;
    }
    if((_count2_Value == 25))
    {
        _dms2Q25 = 1;
    }
    else 
    {
        _dms2Q25 = 0;
    }
    if((_count2_Value == 26))
    {
        _dms2Q26 = 1;
    }
    else 
    {
        _dms2Q26 = 0;
    }
    if((_count2_Value == 27))
    {
        _dms2Q27 = 1;
    }
    else 
    {
        _dms2Q27 = 0;
    }
    if((_count2_Value == 28))
    {
        _dms2Q28 = 1;
    }
    else 
    {
        _dms2Q28 = 0;
    }
    if((_count2_Value == 29))
    {
        _dms2Q29 = 1;
    }
    else 
    {
        _dms2Q29 = 0;
    }
    if((_count2_Value == 30))
    {
        _dms2Q30 = 1;
    }
    else 
    {
        _dms2Q30 = 0;
    }
    if((_count2_Value == 31))
    {
        _dms2Q31 = 1;
    }
    else 
    {
        _dms2Q31 = 0;
    }
    if((_count2_Value == 32))
    {
        _dms2Q32 = 1;
    }
    else 
    {
        _dms2Q32 = 0;
    }
    if((_count2_Value == 33))
    {
        _dms2Q33 = 1;
    }
    else 
    {
        _dms2Q33 = 0;
    }
    if((_count2_Value == 34))
    {
        _dms2Q34 = 1;
    }
    else 
    {
        _dms2Q34 = 0;
    }
    if((_count2_Value == 35))
    {
        _dms2Q35 = 1;
    }
    else 
    {
        _dms2Q35 = 0;
    }
    if((_count2_Value == 36))
    {
        _dms2Q36 = 1;
    }
    else 
    {
        _dms2Q36 = 0;
    }
    if((_count2_Value == 37))
    {
        _dms2Q37 = 1;
    }
    else 
    {
        _dms2Q37 = 0;
    }
    if((_count2_Value == 38))
    {
        _dms2Q38 = 1;
    }
    else 
    {
        _dms2Q38 = 0;
    }
    if((_count2_Value == 39))
    {
        _dms2Q39 = 1;
    }
    else 
    {
        _dms2Q39 = 0;
    }
    if((_count2_Value == 40))
    {
        _dms2Q40 = 1;
    }
    else 
    {
        _dms2Q40 = 0;
    }
    if((_count2_Value == 41))
    {
        _dms2Q41 = 1;
    }
    else 
    {
        _dms2Q41 = 0;
    }
    if((_count2_Value == 42))
    {
        _dms2Q42 = 1;
    }
    else 
    {
        _dms2Q42 = 0;
    }
    if((_count2_Value == 43))
    {
        _dms2Q43 = 1;
    }
    else 
    {
        _dms2Q43 = 0;
    }
    if((_count2_Value == 44))
    {
        _dms2Q44 = 1;
    }
    else 
    {
        _dms2Q44 = 0;
    }
    if((_count2_Value == 45))
    {
        _dms2Q45 = 1;
    }
    else 
    {
        _dms2Q45 = 0;
    }
    if((_count2_Value == 46))
    {
        _dms2Q46 = 1;
    }
    else 
    {
        _dms2Q46 = 0;
    }
    if((_count2_Value == 47))
    {
        _dms2Q47 = 1;
    }
    else 
    {
        _dms2Q47 = 0;
    }
    if((_count2_Value == 48))
    {
        _dms2Q48 = 1;
    }
    else 
    {
        _dms2Q48 = 0;
    }
    if((_count2_Value == 49))
    {
        _dms2Q49 = 1;
    }
    else 
    {
        _dms2Q49 = 0;
    }
    if((_count2_Value == 50))
    {
        _dms2Q50 = 1;
    }
    else 
    {
        _dms2Q50 = 0;
    }
    if((_count2_Value == 51))
    {
        _dms2Q51 = 1;
    }
    else 
    {
        _dms2Q51 = 0;
    }
    if((_count2_Value == 52))
    {
        _dms2Q52 = 1;
    }
    else 
    {
        _dms2Q52 = 0;
    }
    if((_count2_Value == 53))
    {
        _dms2Q53 = 1;
    }
    else 
    {
        _dms2Q53 = 0;
    }
    if((_count2_Value == 54))
    {
        _dms2Q54 = 1;
    }
    else 
    {
        _dms2Q54 = 0;
    }
    if((_count2_Value == 55))
    {
        _dms2Q55 = 1;
    }
    else 
    {
        _dms2Q55 = 0;
    }
    if((_count2_Value == 56))
    {
        _dms2Q56 = 1;
    }
    else 
    {
        _dms2Q56 = 0;
    }
    if((_count2_Value == 57))
    {
        _dms2Q57 = 1;
    }
    else 
    {
        _dms2Q57 = 0;
    }
    if((_count2_Value == 58))
    {
        _dms2Q58 = 1;
    }
    else 
    {
        _dms2Q58 = 0;
    }
    if((_count2_Value == 59))
    {
        _dms2Q59 = 1;
    }
    else 
    {
        _dms2Q59 = 0;
    }
    if((_count2_Value == 60))
    {
        _dms2Q60 = 1;
    }
    else 
    {
        _dms2Q60 = 0;
    }
    if((_count2_Value == 61))
    {
        _dms2Q61 = 1;
    }
    else 
    {
        _dms2Q61 = 0;
    }
    if((_count2_Value == 62))
    {
        _dms2Q62 = 1;
    }
    else 
    {
        _dms2Q62 = 0;
    }
    if((_count2_Value == 63))
    {
        _dms2Q63 = 1;
    }
    else 
    {
        _dms2Q63 = 0;
    }
    _MCP2307_6_O_IO1 = _dms2Q48;
    _MCP2307_6_O_IO2 = _dms2Q49;
    _MCP2307_6_O_IO3 = _dms2Q50;
    _MCP2307_6_O_IO4 = _dms2Q51;
    _MCP2307_6_O_IO5 = _dms2Q52;
    _MCP2307_6_O_IO6 = _dms2Q53;
    _MCP2307_6_O_IO7 = _dms2Q54;
    _MCP2307_6_O_IO8 = _dms2Q55;
    _MCP2307_6_O_IO9 = _dms2Q56;
    _MCP2307_6_O_IO10 = _dms2Q57;
    _MCP2307_6_O_IO11 = _dms2Q58;
    _MCP2307_6_O_IO12 = _dms2Q59;
    _MCP2307_6_O_IO13 = _dms2Q60;
    _MCP2307_6_O_IO14 = _dms2Q61;
    _MCP2307_6_O_IO15 = _dms2Q62;
    _MCP2307_6_O_IO16 = _dms2Q63;
    _MCP2307_5_O_IO1 = _dms2Q32;
    _MCP2307_5_O_IO2 = _dms2Q33;
    _MCP2307_5_O_IO3 = _dms2Q34;
    _MCP2307_5_O_IO4 = _dms2Q35;
    _MCP2307_5_O_IO5 = _dms2Q36;
    _MCP2307_5_O_IO6 = _dms2Q37;
    _MCP2307_5_O_IO7 = _dms2Q38;
    _MCP2307_5_O_IO8 = _dms2Q39;
    _MCP2307_5_O_IO9 = _dms2Q40;
    _MCP2307_5_O_IO10 = _dms2Q41;
    _MCP2307_5_O_IO11 = _dms2Q42;
    _MCP2307_5_O_IO12 = _dms2Q43;
    _MCP2307_5_O_IO13 = _dms2Q44;
    _MCP2307_5_O_IO14 = _dms2Q45;
    _MCP2307_5_O_IO15 = _dms2Q46;
    _MCP2307_5_O_IO16 = _dms2Q47;
    _MCP2307_4_O_IO1 = _dms2Q16;
    _MCP2307_4_O_IO2 = _dms2Q17;
    _MCP2307_4_O_IO3 = _dms2Q18;
    _MCP2307_4_O_IO4 = _dms2Q19;
    _MCP2307_4_O_IO5 = _dms2Q20;
    _MCP2307_4_O_IO6 = _dms2Q21;
    _MCP2307_4_O_IO7 = _dms2Q22;
    _MCP2307_4_O_IO8 = _dms2Q23;
    _MCP2307_4_O_IO9 = _dms2Q24;
    _MCP2307_4_O_IO10 = _dms2Q25;
    _MCP2307_4_O_IO11 = _dms2Q26;
    _MCP2307_4_O_IO12 = _dms2Q27;
    _MCP2307_4_O_IO13 = _dms2Q28;
    _MCP2307_4_O_IO14 = _dms2Q29;
    _MCP2307_4_O_IO15 = _dms2Q30;
    _MCP2307_4_O_IO16 = _dms2Q31;
    _MCP2307_3_O_IO1 = _dms2Q0;
    _MCP2307_3_O_IO2 = _dms2Q1;
    _MCP2307_3_O_IO3 = _dms2Q2;
    _MCP2307_3_O_IO4 = _dms2Q3;
    _MCP2307_3_O_IO5 = _dms2Q4;
    _MCP2307_3_O_IO6 = _dms2Q5;
    _MCP2307_3_O_IO7 = _dms2Q6;
    _MCP2307_3_O_IO8 = _dms2Q7;
    _MCP2307_3_O_IO9 = _dms2Q8;
    _MCP2307_3_O_IO10 = _dms2Q9;
    _MCP2307_3_O_IO11 = _dms2Q10;
    _MCP2307_3_O_IO12 = _dms2Q11;
    _MCP2307_3_O_IO13 = _dms2Q12;
    _MCP2307_3_O_IO14 = _dms2Q13;
    _MCP2307_3_O_IO15 = _dms2Q14;
    _MCP2307_3_O_IO16 = _dms2Q15;
    _inputNumber2_Out = 0;
    if (_MCP2307_0_O_IO1) 
    {
        _inputNumber2_Out = 1;
    }
    if (_MCP2307_0_O_IO2) 
    {
        _inputNumber2_Out = 2;
    }
    if (_MCP2307_0_O_IO3) 
    {
        _inputNumber2_Out = 3;
    }
    if (_MCP2307_0_O_IO4) 
    {
        _inputNumber2_Out = 4;
    }
    if (_MCP2307_0_O_IO5) 
    {
        _inputNumber2_Out = 5;
    }
    if (_MCP2307_0_O_IO6) 
    {
        _inputNumber2_Out = 6;
    }
    if (_MCP2307_0_O_IO7) 
    {
        _inputNumber2_Out = 7;
    }
    if (_MCP2307_0_O_IO8) 
    {
        _inputNumber2_Out = 8;
    }
    if (_MCP2307_0_O_IO9) 
    {
        _inputNumber2_Out = 9;
    }
    if (_MCP2307_0_O_IO10) 
    {
        _inputNumber2_Out = 10;
    }
    if (_MCP2307_0_O_IO11) 
    {
        _inputNumber2_Out = 11;
    }
    if (_MCP2307_0_O_IO12) 
    {
        _inputNumber2_Out = 12;
    }
    if (_MCP2307_0_O_IO13) 
    {
        _inputNumber2_Out = 13;
    }
    if (_MCP2307_0_O_IO14) 
    {
        _inputNumber2_Out = 14;
    }
    if (_MCP2307_0_O_IO15) 
    {
        _inputNumber2_Out = 15;
    }
    if (_MCP2307_0_O_IO16) 
    {
        _inputNumber2_Out = 16;
    }
    if (_MCP2307_1_O_IO1) 
    {
        _inputNumber2_Out = 17;
    }
    if (_MCP2307_1_O_IO2) 
    {
        _inputNumber2_Out = 18;
    }
    if (_MCP2307_1_O_IO3) 
    {
        _inputNumber2_Out = 19;
    }
    if (_MCP2307_1_O_IO4) 
    {
        _inputNumber2_Out = 20;
    }
    if (_MCP2307_1_O_IO5) 
    {
        _inputNumber2_Out = 21;
    }
    if (_MCP2307_1_O_IO6) 
    {
        _inputNumber2_Out = 22;
    }
    if (_MCP2307_1_O_IO7) 
    {
        _inputNumber2_Out = 23;
    }
    if (_MCP2307_1_O_IO8) 
    {
        _inputNumber2_Out = 24;
    }
    if (_MCP2307_1_O_IO9) 
    {
        _inputNumber2_Out = 25;
    }
    if (_MCP2307_1_O_IO10) 
    {
        _inputNumber2_Out = 26;
    }
    if (_MCP2307_1_O_IO11) 
    {
        _inputNumber2_Out = 27;
    }
    if (_MCP2307_1_O_IO12) 
    {
        _inputNumber2_Out = 28;
    }
    if (_MCP2307_1_O_IO13) 
    {
        _inputNumber2_Out = 29;
    }
    if (_MCP2307_1_O_IO14) 
    {
        _inputNumber2_Out = 30;
    }
    if (_MCP2307_1_O_IO15) 
    {
        _inputNumber2_Out = 31;
    }
    if (_MCP2307_1_O_IO16) 
    {
        _inputNumber2_Out = 32;
    }
    if (_MCP2307_2_O_IO1) 
    {
        _inputNumber2_Out = 33;
    }
    if (_MCP2307_2_O_IO2) 
    {
        _inputNumber2_Out = 34;
    }
    if (_MCP2307_2_O_IO3) 
    {
        _inputNumber2_Out = 35;
    }
    if (_MCP2307_2_O_IO4) 
    {
        _inputNumber2_Out = 36;
    }
    if (_MCP2307_2_O_IO5) 
    {
        _inputNumber2_Out = 37;
    }
    if (_MCP2307_2_O_IO6) 
    {
        _inputNumber2_Out = 38;
    }
    if (_MCP2307_2_O_IO7) 
    {
        _inputNumber2_Out = 39;
    }
    if (_MCP2307_2_O_IO8) 
    {
        _inputNumber2_Out = 40;
    }
    if (_MCP2307_2_O_IO9) 
    {
        _inputNumber2_Out = 41;
    }
    if (_MCP2307_2_O_IO10) 
    {
        _inputNumber2_Out = 42;
    }
    if (_MCP2307_2_O_IO11) 
    {
        _inputNumber2_Out = 43;
    }
    if (_MCP2307_2_O_IO12) 
    {
        _inputNumber2_Out = 44;
    }
    if (_MCP2307_2_O_IO13) 
    {
        _inputNumber2_Out = 45;
    }
    if (_MCP2307_2_O_IO14) 
    {
        _inputNumber2_Out = 46;
    }
    if (_MCP2307_2_O_IO15) 
    {
        _inputNumber2_Out = 47;
    }
    if (_MCP2307_2_O_IO16) 
    {
        _inputNumber2_Out = 48;
    }
    if (_MCP2307_7_O_IO1) 
    {
        _inputNumber2_Out = 49;
    }
    if (_MCP2307_7_O_IO2) 
    {
        _inputNumber2_Out = 50;
    }
    if (_MCP2307_7_O_IO3) 
    {
        _inputNumber2_Out = 51;
    }
    if (_MCP2307_7_O_IO4) 
    {
        _inputNumber2_Out = 52;
    }
    if (_MCP2307_7_O_IO5) 
    {
        _inputNumber2_Out = 53;
    }
    if (_MCP2307_7_O_IO6) 
    {
        _inputNumber2_Out = 54;
    }
    if (_MCP2307_7_O_IO7) 
    {
        _inputNumber2_Out = 55;
    }
    if (_MCP2307_7_O_IO8) 
    {
        _inputNumber2_Out = 56;
    }
    if (_MCP2307_7_O_IO9) 
    {
        _inputNumber2_Out = 57;
    }
    if (_MCP2307_7_O_IO10) 
    {
        _inputNumber2_Out = 58;
    }
    if (_MCP2307_7_O_IO11) 
    {
        _inputNumber2_Out = 59;
    }
    if (_MCP2307_7_O_IO12) 
    {
        _inputNumber2_Out = 60;
    }
    if (_MCP2307_7_O_IO13) 
    {
        _inputNumber2_Out = 61;
    }
    if (_MCP2307_7_O_IO14) 
    {
        _inputNumber2_Out = 62;
    }
    if (_MCP2307_7_O_IO15) 
    {
        _inputNumber2_Out = 63;
    }
    if (_MCP2307_7_O_IO16) 
    {
        _inputNumber2_Out = 64;
    }
    //Плата:3
    _Terminal_63920110 = ((String("БАТ ")) + ((_floatToStringWitRaz(((analogRead (0)))/(102.2),1))) + (String("В")));
    _Terminal_96845443 = ((analogRead (0))) <= (615);
    if (((analogRead (0))) >= (600)) 
    {
        if (! _gen1I)
        {
            _gen1I = 1;
            _gen1O = 1;
            _gen1P = millis();
        }
    }
     else 
    {
        _gen1I = 0 ;
        _gen1O= 0;
    }
     if (_gen1I &&  _gen1O)   _gen1O = !(flprog::isTimer(_gen1P , 500));
    if(!(_bounseInputD0O)) _trgr2 = 0;
    if(_gen1O) _trgr2 = 1;
    digitalWrite(2, _trgr2);
    _MCP2307_4.digitalWrite(0, _MCP2307_4_O_IO1);
    _MCP2307_4.digitalWrite(1, _MCP2307_4_O_IO2);
    _MCP2307_4.digitalWrite(2, _MCP2307_4_O_IO3);
    _MCP2307_4.digitalWrite(3, _MCP2307_4_O_IO4);
    _MCP2307_4.digitalWrite(4, _MCP2307_4_O_IO5);
    _MCP2307_4.digitalWrite(5, _MCP2307_4_O_IO6);
    _MCP2307_4.digitalWrite(6, _MCP2307_4_O_IO7);
    _MCP2307_4.digitalWrite(7, _MCP2307_4_O_IO8);
    _MCP2307_4.digitalWrite(8, _MCP2307_4_O_IO9);
    _MCP2307_4.digitalWrite(9, _MCP2307_4_O_IO10);
    _MCP2307_4.digitalWrite(10, _MCP2307_4_O_IO11);
    _MCP2307_4.digitalWrite(11, _MCP2307_4_O_IO12);
    _MCP2307_4.digitalWrite(12, _MCP2307_4_O_IO13);
    _MCP2307_4.digitalWrite(13, _MCP2307_4_O_IO14);
    _MCP2307_4.digitalWrite(14, _MCP2307_4_O_IO15);
    _MCP2307_4.digitalWrite(15, _MCP2307_4_O_IO16);
    _MCP2307_5.digitalWrite(0, _MCP2307_5_O_IO1);
    _MCP2307_5.digitalWrite(1, _MCP2307_5_O_IO2);
    _MCP2307_5.digitalWrite(2, _MCP2307_5_O_IO3);
    _MCP2307_5.digitalWrite(3, _MCP2307_5_O_IO4);
    _MCP2307_5.digitalWrite(4, _MCP2307_5_O_IO5);
    _MCP2307_5.digitalWrite(5, _MCP2307_5_O_IO6);
    _MCP2307_5.digitalWrite(6, _MCP2307_5_O_IO7);
    _MCP2307_5.digitalWrite(7, _MCP2307_5_O_IO8);
    _MCP2307_5.digitalWrite(8, _MCP2307_5_O_IO9);
    _MCP2307_5.digitalWrite(9, _MCP2307_5_O_IO10);
    _MCP2307_5.digitalWrite(10, _MCP2307_5_O_IO11);
    _MCP2307_5.digitalWrite(11, _MCP2307_5_O_IO12);
    _MCP2307_5.digitalWrite(12, _MCP2307_5_O_IO13);
    _MCP2307_5.digitalWrite(13, _MCP2307_5_O_IO14);
    _MCP2307_5.digitalWrite(14, _MCP2307_5_O_IO15);
    _MCP2307_5.digitalWrite(15, _MCP2307_5_O_IO16);
    _MCP2307_3.digitalWrite(0, _MCP2307_3_O_IO1);
    _MCP2307_3.digitalWrite(1, _MCP2307_3_O_IO2);
    _MCP2307_3.digitalWrite(2, _MCP2307_3_O_IO3);
    _MCP2307_3.digitalWrite(3, _MCP2307_3_O_IO4);
    _MCP2307_3.digitalWrite(4, _MCP2307_3_O_IO5);
    _MCP2307_3.digitalWrite(5, _MCP2307_3_O_IO6);
    _MCP2307_3.digitalWrite(6, _MCP2307_3_O_IO7);
    _MCP2307_3.digitalWrite(7, _MCP2307_3_O_IO8);
    _MCP2307_3.digitalWrite(8, _MCP2307_3_O_IO9);
    _MCP2307_3.digitalWrite(9, _MCP2307_3_O_IO10);
    _MCP2307_3.digitalWrite(10, _MCP2307_3_O_IO11);
    _MCP2307_3.digitalWrite(11, _MCP2307_3_O_IO12);
    _MCP2307_3.digitalWrite(12, _MCP2307_3_O_IO13);
    _MCP2307_3.digitalWrite(13, _MCP2307_3_O_IO14);
    _MCP2307_3.digitalWrite(14, _MCP2307_3_O_IO15);
    _MCP2307_3.digitalWrite(15, _MCP2307_3_O_IO16);
    _MCP2307_6.digitalWrite(0, _MCP2307_6_O_IO1);
    _MCP2307_6.digitalWrite(1, _MCP2307_6_O_IO2);
    _MCP2307_6.digitalWrite(2, _MCP2307_6_O_IO3);
    _MCP2307_6.digitalWrite(3, _MCP2307_6_O_IO4);
    _MCP2307_6.digitalWrite(4, _MCP2307_6_O_IO5);
    _MCP2307_6.digitalWrite(5, _MCP2307_6_O_IO6);
    _MCP2307_6.digitalWrite(6, _MCP2307_6_O_IO7);
    _MCP2307_6.digitalWrite(7, _MCP2307_6_O_IO8);
    _MCP2307_6.digitalWrite(8, _MCP2307_6_O_IO9);
    _MCP2307_6.digitalWrite(9, _MCP2307_6_O_IO10);
    _MCP2307_6.digitalWrite(10, _MCP2307_6_O_IO11);
    _MCP2307_6.digitalWrite(11, _MCP2307_6_O_IO12);
    _MCP2307_6.digitalWrite(12, _MCP2307_6_O_IO13);
    _MCP2307_6.digitalWrite(13, _MCP2307_6_O_IO14);
    _MCP2307_6.digitalWrite(14, _MCP2307_6_O_IO15);
    _MCP2307_6.digitalWrite(15, _MCP2307_6_O_IO16);
}
String  _floatToStringWitRaz(float value, int raz)
{
    return String(value,raz);
}
String utf8rus(String source)
{
    int i,k;
    String target;
    unsigned char n;
    char m[2] = { '0', '\0' };
    k = source.length();
    i = 0;
    while (i < k) 
    {
        n = source[i];
        i++;
        if (n >= 0xC0) 
        {
            switch (n) 
            {
                case 0xD0: 
                {
                    n = source[i];
                    i++;
                    if (n == 0x81) 
                    {
                        n = 0xA8;
                        break;
                    }
                    if (n >= 0x90 && n <= 0xBF) n = n + 0x30;
                    break;
                }
                case 0xD1: 
                {
                    n = source[i];
                    i++;
                    if (n == 0x91) 
                    {
                        n = 0xB8;
                        break;
                    }
                    if (n >= 0x80 && n <= 0x8F) n = n + 0x70;
                    break;
                }
            }
        }
        m[0] = n;
        target = target + String(m);
    }
    return target;
}
