   int ByteCount = Serial.readBytesUntil(nl,Buffer,sizeof(Buffer));
   String read_ = String(Buffer);
   memset(Buffer,0,sizeof(Buffer));
-  
+   
   // separate command from associated data
   int idx = read_.indexOf(sp);
   cmd = read_.substring(0,idx);

int Q1 = 0;                    // last value written to Q1 pin
int Q2 = 0;                    // last value written to Q2 poin
int alarmStatus = 0;           // hi temperature alarm status

// constants
const String vers = "0.1";     // version of this firmware
const int baud = 9600;         // serial baud rate
const char sp = ' ';           // command separator
const char nl = '\n';          // command terminator

// pin numbers corresponding to signals on the TC Lab Shield
const int pinT1   = 0;         // T1
const int pinT2   = 2;         // T2
const int pinQ1   = 3;         // Q1
const int pinQ2   = 5;         // Q2
const int pinLED1 = 9;         // LED1

// high limits expressed (units of pin values)
const int limQ1   = 150;       // Q1 limit
const int limQ2   = 150;       // Q2 limit
const int limT1   = 310;       // T1 high alarm (approx. 50 deg C)
const int limT2   = 310;       // T2 high alarm (approx. 50 deg C)

// LED1 levels
const int hiLED   =  50;       // high limit of LED
const int loLED   = hiLED/16;  // low LED

void setHeater1(int pv) {
  if (brdStatus > 0) {
    Q1 = max(0, min(limQ1, pv));
    analogWrite(pinQ1, Q1);
    Serial.println(Q1);
  }
}


  while (!Serial) {
    ; // wait for serial port to connect.
  }
  setHeater1(0);
  setHeater2(0);
}

// arduino main event loop
