#include <SoftwareSerial.h>
SoftwareSerial BTserial(2, 3); // Eingang am Ard. | Ausgang am Ard.

int led = 4;
String msg = "";

void setup() {
  BTserial.begin(9600);
  pinMode(led, OUTPUT);
  digitalWrite(led, LOW);
}

void loop() {
  if (BTserial.available()) {
    char c = BTserial.read();
    if (c != ';') {
      msg = msg + c;
    } else {
      if (msg == "ON") {
        digitalWrite(led, HIGH);
        BTserial.write("OK;");
      } else if (msg == "OFF") {
        digitalWrite(led, LOW);
        BTserial.write("OK;");
      }
      msg = "";
    }
  }
}