Same applies...
bubulindo:
Why don't you adjust the temperature to the PWM directly?map(temp, green_low, green_high, 0, 255); //or some other PWM values that do what you want...
Ok, do this:
for (long temp=0; temp <100; temp++) {
int blue = 255 - (map(temp, 31, 0, 0, 63) * 4);
int green = 255 - (map(temp, 34, 26, 0, 100) * 2);
int red = 255 - (map(temp, 50, 31, 0, 63) * 4);
Serial.print("blue ");
Serial.println(blue);
Serial.print("green ");
Serial.println(green);
Serial.print("red ");
Serial.println(red);
What do you see?