 byte productID[] = { 0x0, 0x0, 0x10 };
 
 int ledPin = 13;
+
+int ledValue = 0;
+
+byte comPing      = 0x1;
+byte comBack      = 0x2;
+byte comGet       = 0x3;
+byte comSet       = 0x4;
+byte comReturn    = 0x5;
 
 void setup() {
   Serial.begin(9600, SERIAL_8O1);

      if (data[0] >> 3 == id){
        byte kom = data[0] & B00000111;
        
        if (kom == B101)
        {
          byte dataType =  data[1];
          int value = data[2];

  return header;
}

void returnValue(byte dataID)
{
  short value;
  
  if (dataID == 0x1)
  {
    value = ledValue;
  }
  
  byte header = createHeader(comReturn);
  byte returnMessage[4] = { header, dataID, (byte)(value >> 8), (byte)value };

  Serial.write(returnMessage, 4);
}

void handleDataChange(byte dataType, int value) {
  if (dataType == 1){
    ledValue = value == 0 ? LOW : HIGH;
    digitalWrite(ledPin, ledValue);
  }
}

