Servo programming problems

I tried to turn a servo using a temperature sensor, and failed.
Here is the programming.

If there's some obvious mistake, have in mind that I'm new to Arduino and programming.

#include <Servo.h>

Servo myServo;

int const sensorPin = A0;
int sensorVal;
int angle;
const float baselineTemp = 20;

void setup(){
myServo.attach(9);

Serial.begin(9600);
}

void loop(){
sensorVal = analogRead(sensorPin);
Serial.print("sensorVal: ");
Serial.print(sensorVal);

float voltage = (sensorVal/1024.0) * 5.0;

Serial.print(", Volts: ");
Serial.print(voltage);

Serial.print(", degrees C: ");
float temperature = (voltage - .5 * 100);
Serial.print(temperature);

angle = map(sensorVal, 0, 1023, 0, 179);
Serial.print(", angle: ");
Serial.println(angle);

if(temperature < baselineTemp){
angle = (1000, 170);

}else if(temperature >= baselineTemp && temperature < baselineTemp+0.02){
angle = (600, 100);

}else if(temperature >= baselineTemp+0.02){
angle = (200, 30);
delay(1);

myServo.write(angle);
delay(15);
}
}

My temperature sensor isn't very sensitive.

    angle = (1000, 170);

Say what?

My temperature sensor isn't very sensitive.

That's OK. Your code isn't (any/very) good either.

I suggest you start your testing by outputting your sensor values to the serial monitor to see if you are generating the servo control values you are expecting. Also use code tags instead of quote tags for your code.

angle = (1000, 170);

This is not valid C/C++ code. What are you trying to do?

Also, you have already defined angle using map() earlier.

...R

Robin2:

angle = (1000, 170);

This is not valid C/C++ code. What are you trying to do?

Also, you have already defined angle using map() earlier.

...R

It isn't?

AWOL:
It isn't?

Perhaps I should have said it is not valid in the way the OP is using it.

And perhaps the problem is that compiler did not object even though it makes no sense.

...R