help with one wire temperature sensor LED project

i have been working on a temperature sensor project as one of my first big projects with Arduino. i want to read one of the one wire temperature sensors and based on what i set in an if statement be able to make the LED glow red, green, or blue. Here is what i came up with. in the if statement it replies "Thermistor1 cannot be used as a function", "ISO C++ forbids comparison between pointer and integer". Thanks to any one that replies for help!

#include <OneWire.h>
#include <DallasTemperature.h>

// 1 wire data pin 3
#define ONE_WIRE_BUS 3

OneWire oneWire(ONE_WIRE_BUS);

DallasTemperature sensors(&oneWire);

DeviceAddress Thermistor1 = { 0x28, 0x6A, 0x15, 0x41, 0x05, 0x00, 0x00, 0xE6 };
DeviceAddress Thermistor2 = { 0x28, 0xD0, 0xB1, 0x40, 0x05, 0x00, 0x00, 0x8D };
DeviceAddress Thermistor3 = { 0x28, 0xF2, 0x96, 0x40, 0x05, 0x00, 0x00, 0xFC };
DeviceAddress Thermistor4 = { 0x28, 0x37, 0xB6, 0x40, 0x05, 0x00, 0x00, 0x70 };
DeviceAddress Thermistor5 = { 0x28, 0x8A, 0x1E, 0x41, 0x05, 0x00, 0x00, 0xBF };

int R = 2;

int G = 3;

int B = 4;

void setup(void)
{
// Start serial port
Serial.begin(9600);
// Start the library
sensors.begin();
// Sets the resolution to 12 bit
sensors.setResolution(Thermistor1, 12);
sensors.setResolution(Thermistor2, 12);
sensors.setResolution(Thermistor3, 12);
sensors.setResolution(Thermistor4, 12);
sensors.setResolution(Thermistor5, 12);
}

void printTemperature(DeviceAddress deviceAddress)
{
float tempC = sensors.getTempC(deviceAddress);
if (tempC == -127.00)
{
Serial.print("Error getting temperature");
}
else
{
Serial.print("F: ");
Serial.print(DallasTemperature::toFahrenheit(tempC));

}

pinMode(R, OUTPUT);
pinMode(G, OUTPUT);
pinMode(B, OUTPUT);
}

void loop(void)
{
delay(5000);
Serial.print("Getting temperature...\n\r");
sensors.requestTemperatures();

Serial.print("Thermistor 1 temperature is: ");
printTemperature(Thermistor1);
Serial.print("\n\r");
Serial.print("Thermistor 2 temperature is: ");
printTemperature(Thermistor2);
Serial.print("\n\r");
Serial.print("Thermistor 3 temperature is: ");
printTemperature(Thermistor3);
Serial.print("\n\r");
Serial.print("Thermistor 4 temperature is: ");
printTemperature(Thermistor4);
Serial.print("\n\r");
Serial.print("Thermistor 5 temperature is: ");
printTemperature(Thermistor5);
Serial.print("\n\r\n\r");

if (Thermistor1 > 78)
{
digitalWrite(R, HIGH);
}
else
{
digitalWrite(R, LOW);
}
if (Thermistor1 == 78)
{
digitalWrite(G, HIGH);
}
else
{
digitalWrite(G, LOW);
}
if (Thermistor1 < 78)
{
digitalWrite(B, HIGH);
}
else
{
digitalWrite(B, LOW);
}
}

I think it's just a case of improper allocation of variables

This compiles OK, and may be closer to what you want.

#include <OneWire.h>
#include <DallasTemperature.h>

// 1 wire data pin 3
#define ONE_WIRE_BUS 3

OneWire oneWire(ONE_WIRE_BUS);

DallasTemperature sensors(&oneWire);

DeviceAddress Thermistor1 = { 0x28, 0x6A, 0x15, 0x41, 0x05, 0x00, 0x00, 0xE6 };
DeviceAddress Thermistor2 = { 0x28, 0xD0, 0xB1, 0x40, 0x05, 0x00, 0x00, 0x8D };
DeviceAddress Thermistor3 = { 0x28, 0xF2, 0x96, 0x40, 0x05, 0x00, 0x00, 0xFC };
DeviceAddress Thermistor4 = { 0x28, 0x37, 0xB6, 0x40, 0x05, 0x00, 0x00, 0x70 };
DeviceAddress Thermistor5 = { 0x28, 0x8A, 0x1E, 0x41, 0x05, 0x00, 0x00, 0xBF };

int R = 2;

int G = 3;

int B = 4;

int T1, T2, T3, T4, T5;

void setup(void)
{
 // Start serial port
 Serial.begin(9600);
 // Start the library
 sensors.begin();
 // Sets the resolution to 12 bit
 sensors.setResolution(Thermistor1, 12);
 sensors.setResolution(Thermistor2, 12);
 sensors.setResolution(Thermistor3, 12);
 sensors.setResolution(Thermistor4, 12);
 sensors.setResolution(Thermistor5, 12);
}

void printTemperature(DeviceAddress deviceAddress)
{
  float tempC = sensors.getTempC(deviceAddress);
  if (tempC == -127.00)
  {
   Serial.print("Error getting temperature");  
  }
  else
  {
   Serial.print("F: ");
   Serial.print(DallasTemperature::toFahrenheit(tempC));
  
  }
 
 pinMode(R, OUTPUT);
 pinMode(G, OUTPUT);
 pinMode(B, OUTPUT);
}

void loop(void)
{
 delay(5000);
 Serial.print("Getting temperature...\n\r");
 sensors.requestTemperatures();

 Serial.print("Thermistor 1 temperature is: ");
 printTemperature(Thermistor1);
 Serial.print("\n\r");
 Serial.print("Thermistor 2 temperature is: ");
 printTemperature(Thermistor2);
 Serial.print("\n\r");
 Serial.print("Thermistor 3 temperature is: ");
 printTemperature(Thermistor3);
 Serial.print("\n\r");
 Serial.print("Thermistor 4 temperature is: ");
 printTemperature(Thermistor4);
 Serial.print("\n\r");
 Serial.print("Thermistor 5 temperature is: ");
 printTemperature(Thermistor5);
 Serial.print("\n\r\n\r");
 
 if (T1 > 78)
 {
  digitalWrite(R, HIGH);
 }
 else
 {
  digitalWrite(R, LOW);
 }
 if (T1 == 78)
 {
  digitalWrite(G, HIGH);
 }
 else
 {
  digitalWrite(G, LOW);
 }
 if (T1 < 78)
 {
  digitalWrite(B, HIGH);
 }
 else
 {
  digitalWrite(B, LOW);
 }
}

The resolution commands are redundant

Thermistor1 and the others are objects. You cannot compare objects with integers.

If you want help with errors in your code you need to provide the whole error message, not just a summary. In this example, the compiler will tell you where the error is, and you haven't told us that.

My guess is it is in the code like this:

if (Thermistor1 > 78)
 {
  digitalWrite(R, HIGH);
 }
...etc

The code looks nonsensical - it attempts to compare an integer with an array holding a device address. Even assuming you managed to get it to compile, what do you think it would achieve? From the context it's clear that what you want to compare is the temperature read from the device, not the device address. You already have code in printTemperature() that shows how to read the temperature from a given sensor. It would be best to separate out the code to read the temperature from the code to display it and do whatever other else you want based on the value.

As a general guide, when you find yourself creating numbered variables and doing similar things with them, such as Thermistor1, Thermistor2 etc, you should consider using an array instead. This would eliminate a lot of duplication in your code.

Also note that the library you're using is designed to interface to 1-wire digital thermometers. Thermisters and digital thermometers very different things, so the names Thermistor1 etc are not well chosen.

thanks to everyone for the help.