How to read Negative number with serial.read how i can read negative number with command Serial.read()?
beacouse i with  this

    char tmpChar = Serial.read(); //read incoming character from serial port
    if (isDigit(tmpChar)) { //check if the in character it's a number
        setpoint =  (setpoint  * 10 ) + tmpChar - '0'; // convert from ascii code to it's corresponding number; '0' == DEC 48
      }
if (tmpChar == '\n' || tmpChar == '\r') { //if CR or LF was received
    if (setpoint &gt; 0) {
      tmpChar = "";
      Serial.print(setpoint);
      Serial.println(" NUMERO STEP IN AVANTI");

    }


im using an encoder motor, i want to move for N steps the motor forward (positive number) or backward (negative number) , i insert the number of step in serial input

i can read only positive number. Thanks for help

how suggest Majenko i made a partial solution :

char buf[8];
int valore = 0;

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

void loop() {
  if (Serial.available() &gt;= 8) {
    for (int i = 0; i &lt; 8; i++) {
      buf[i] = Serial.read();

    }
    String str();
    if (buf[0] == "-") {
      valore = (atoi(buf)) * -1;
      Serial.println(valore);

    }
    else {
      valore =  atoi(buf);
      Serial.println(valore);
    }
  }
}


but the problem now it's the static array , 
unpleasant to use
You could do something like this:

static int setpoint;      // the partially read setpoint
static bool isNegative;   // whether it should be negative
void applySetpoint(int);  // apply the setpoint when fully read

char tmpChar = Serial.read();
if (isDigit(tmpChar)) {
    setpoint =  (setpoint  * 10 ) + tmpChar - '0';
} else if (tmpChar == '-') {  // minus sign
    isNegative = true;
} else if (tmpChar == '\r') {  // line terminator
    if (isNegative) {
        setpoint = -setpoint;
        isNegative = false;  // reset for next read
    }
    applySetpoint(setpoint);
}


Note that this is not very robust: it will happily interpret "3-2" as
meaning "-32". Note also that I assumed your terminator to be '\r', you
may be using another one.