void setup() {
  // put your setup code here, to run once:
Serial.begin(9600);
}

void loop() {
  // put your main code here, to run repeatedly:
Serial.println("Map-Befehl-Generator");
Serial.println("Format: value;fromLow;fromHigh;toLow;toHigh");

while(!Serial.available()) {};
int value = Serial.readStringUntil(';').toInt();
int fromLow = Serial.readStringUntil(';').toInt();
int fromHigh = Serial.readStringUntil(';').toInt();
int toLow = Serial.readStringUntil(';').toInt();
int toHigh = Serial.readStringUntil(';').toInt();

int mappedValue = map(value, fromLow, fromHigh, toLow, toHigh);

Serial.print("Ergebnis: ");
Serial.println(mappedValue);
Serial.println();
}