Looks pretty good. I have a few suggestions:
//// Since these values don't change I'd recommend using the 'const' storage type. This will allow
//// the compiler to warn you if you accidentally try to change them at run time. It also allows for
//// better optimization because the compiler knows the values won't change.
const int ledPins[] = {2,3,4,5,6,7,8,9,10}; // Initialize array of led pins
const int temperaturePin = 0; //Initialize temperature pin
//// Since you treat the red LED (#8) separately it might be clearer to have it in a separate declaration:
const int redLED = 10;
const int ledPins[] = {2,3,4,5,6,7,8,9}; // Initialize array of led pins
void setup()
{
//// Rather than use a magic constant here you can use a formula that will always match the size of the
//// array of pins:
for(int i = 0; i < (sizeof ledPins/sizeof ledPins[0]); i++)
//// Note that the 'sizeof' operator gives an answer in bytes.
//// We have to divide by the size of a single element to get the array size in elements
{ //set led pins as outputs
pinMode(ledPins[i],OUTPUT);
}
//// And if we treat the red LED as separate:
pinMode(redLED, OUTPUT);
}
void loop()
{
float tempC = getVoltage(temperaturePin); //getting the voltage reading from the temperature sensor
tempC = (tempC - .5) * 100; //converting from 10 mv per degree wit 500 mV offset
float tempF = tempC*1.8+32; //convert C to F
int abstempF = fabs(tempF); // take abs value of temp in F
if(tempF <0) //light red pin if temp in F is negative
digitalWrite(redLED,HIGH);
else
digitalWrite(redLED,LOW); //do not light red pin if temp in F is positive
//// Since HIGH and LOW are synonyms for 'true' and 'false' this can simplify to:
digitalWrite(redLED, tempF < 0); // Light the red LED if the temperature is below 0
for(int i = 7; i >= 0; i--){
////
//// WARNING: the pow() function works on float values and the conversions can cause round-off errors
//// For integer powers of 2 it is best to use the left shift operator <<
////
if ((1<<i) <= abstempF) { //converts decimal to binary one digit at a time (assumes temp in F cannot be above 127)
digitalWrite(ledPins[i], HIGH);
//// When you have something that looks like "variable = variable op value" you can use the C shorthand assignment operators;
////
//// X = X + Y; can be written X += Y;
//// X = X - Y; can be written X -= Y;
//// X = X * Y; can be written X *= Y;
////
abstempF -= (i<<i);
}
else
digitalWrite(ledPins[i], LOW);
}
delay(1000);
}
float getVoltage(int pin){
return (analogRead(pin) * .004882814); //converting from a 0 to 1024 digital range
// to 0 to 5 volts (each 1 reading equals ~ 5 millivolts
}

[/quote]