   if(Serial.available())
   {
     byte character = (char)Serial.read();
-    if(character == '+')
+    if(character == '\n')
+      return;
+    if(character == '\r')
+      return;
+      
+    if(character == '-')
       voltageValue += 1;
-    else if(character == '-')
+    else if(character == '+')
       voltageValue -= 1;
 
     if(voltageValue < 0)

    Serial.print("New Voltage: ");
    Serial.print(voltageTargetValue);
    Serial.print("  ");
    Serial.print(voltageValue/10.f);
    Serial.println("V");
  }
}


#define MAX_VOLTAGE 500
#define N 3
int voltagePins[N] = { 8, 9, 10 };
int voltageValue = MAX_VOLTAGE;
byte voltageTargetValue = 0;

void setup()
{
  for(uint8_t i=0; i < N; ++i)
    pinMode(voltagePins[i], OUTPUT);
  Serial.begin(9600);
  Serial.println("Ready... enter: + -");

  voltageTargetValue = map(voltageValue, 0, MAX_VOLTAGE, 0, 255);
}

void checkSerial()
