     pinMode(m_pinOff,OUTPUT);
     digitalWrite(m_pinOff,LOW);
   }
-  m_lastLedState = 0;
-  m_lastPinState = HIGH;
 }
 
 void digitalPin::updateSwitch() {

class analogOutPin {
  public:
    analogOutPin(const uint8_t id, const uint8_t pin);
    void updateState(const uint8_t val);
    const uint8_t getId() { return(m_id); }
  private:
    const uint8_t m_id, m_pin;
};

    digitalPin(const uint8_t id, const uint8_t pinSwitch, const uint8_t pinOn, const uint8_t pinOff);
    void updateSwitch();
    void updateLedState(const uint8_t c, const uint8_t val);
    void updateLed(const bool blink) const ;
    const uint8_t getId() const { return(m_id); }
  private:
    const uint8_t m_id, m_pinSwitch, m_pinOn, m_pinOff;
    uint8_t m_lastPinState { HIGH } ;
    uint8_t m_lastLedState { 0 } ; // bits: 0=GxON, 1=RxON, 2=GxBLINK, 3=RxBLINK
};

digitalPin digiPins[] = {
