Need a little help with the DS18B20 temperature sensor

Need a little help with the DS18B20 temperature sensor

I am building a pellet stove controller. This just needs to be very basic because it is going in my garage. There is an auger that feeds the pellets into the stove it is on for a second off for a second. The problem is if the stove gets to hot the pellets in the hopper could catch on fire. This really isn’t a huge deal. We are turning it off when we’re not there and will just put a piece of steel over it and let it burn its self out if it does happen (there is no fire risk at all). However I am trying to not let this happen. So I need to shut off the auger motor if the crock temp gets over 250 degrees F. Right now I have it so it will shut off but after it cools the auger motor starts feeding pellets again. This is no good because the fire has gone out by the time it cools down and it just feeds pellets into a cold stove. I am not sure how to put a button in there and tell the code don’t turn back on until I press the button.

I really appreciate all the help.

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

// Data wire is plugged into port 2 on the Arduino
#define ONE_WIRE_BUS 2

// Setup a oneWire instance to communicate with any OneWire devices (not just Maxim/Dallas temperature ICs)
OneWire oneWire(ONE_WIRE_BUS);

// Pass our oneWire reference to Dallas Temperature. 
DallasTemperature sensors(&oneWire);

// arrays to hold device addresses
DeviceAddress insideThermometer, outsideThermometer;

// function that will be called when an alarm condition exists during DallasTemperatures::processAlarms();
void newAlarmHandler(uint8_t* deviceAddress)
{
  Serial.println("Alarm Handler Start"); 
  printAlarmInfo(deviceAddress);
  printTemp(deviceAddress);
  Serial.println();
  Serial.println("Alarm Handler Finish");
}

void printCurrentTemp(DeviceAddress deviceAddress)
{
  printAddress(deviceAddress);
  printTemp(deviceAddress);
  Serial.println();
}

void printAddress(DeviceAddress deviceAddress)
{
  Serial.print("Address: ");
  for (uint8_t i = 0; i < 8; i++)
  {
    if (deviceAddress[i] < 16) Serial.print("0");
    Serial.print(deviceAddress[i], HEX);
  }
  Serial.print(" ");
}

void printTemp(DeviceAddress deviceAddress)
{
  float tempC = sensors.getTempC(deviceAddress);
  if (tempC != DEVICE_DISCONNECTED)
  {
    Serial.print("Current Temp C: ");
    Serial.print(tempC);
  }
  else Serial.print("DEVICE DISCONNECTED");
  Serial.print(" ");
}

void printAlarmInfo(DeviceAddress deviceAddress)
{
  char temp;
  printAddress(deviceAddress);
  temp = sensors.getHighAlarmTemp(deviceAddress);
  Serial.print("High Alarm: ");
  Serial.print(temp, DEC);
  Serial.print("C");
  Serial.print(" Low Alarm: ");
  temp = sensors.getLowAlarmTemp(deviceAddress);
  Serial.print(temp, DEC);
  Serial.print("C");
  Serial.print(" ");
}

void setup(void)
{
  // start serial port
  Serial.begin(9600);
  Serial.println("Dallas Temperature IC Control Library Demo");

  // Start up the library
  sensors.begin();
  
  // locate devices on the bus
  Serial.print("Found ");
  Serial.print(sensors.getDeviceCount(), DEC);
  Serial.println(" devices.");

  // search for devices on the bus and assign based on an index
  if (!sensors.getAddress(insideThermometer, 0)) Serial.println("Unable to find address for Device 0"); 
  if (!sensors.getAddress(outsideThermometer, 1)) Serial.println("Unable to find address for Device 1"); 

  Serial.print("Device insideThermometer ");
  printAlarmInfo(insideThermometer);
  Serial.println();
  
  Serial.print("Device outsideThermometer ");
  printAlarmInfo(outsideThermometer);
  Serial.println();
  
  // set alarm ranges
  Serial.println("Setting alarm temps...");
  sensors.setHighAlarmTemp(insideThermometer,22);
  sensors.setLowAlarmTemp(insideThermometer, 1);
  sensors.setHighAlarmTemp(outsideThermometer, 22);
  sensors.setLowAlarmTemp(outsideThermometer, 1);
  
  Serial.print("New insideThermometer ");
  printAlarmInfo(insideThermometer);
  Serial.println();
  
  Serial.print("New outsideThermometer ");
  printAlarmInfo(outsideThermometer);
  Serial.println();

  // attach alarm handler
  sensors.setAlarmHandler(&newAlarmHandler);
}

void loop(void)
{ 

  // ask the devices to measure the temperature
  sensors.requestTemperatures();
  
  // if an alarm condition exists as a result of the most recent 
  // requestTemperatures() request, it exists until the next time 
  // requestTemperatures() is called AND there isn't an alarm condition
  // on the device
  if (sensors.hasAlarm())
  {
    Serial.println("CROCK IS OVER TEMP.");
    digitalWrite(13, LOW);
  }
    else 
    {
    pinMode(13,OUTPUT);
 digitalWrite(13, HIGH);   // set the auger motor on
  delay(1000);              // wait for a second
  digitalWrite(13, LOW);    // set the auger motor off
  delay(1000);              // wait for a second
  }

  // call alarm handler function defined by sensors.setAlarmHandler
  // for each device reporting an alarm
  sensors.processAlarms();

  if (!sensors.hasAlarm())
  digitalWrite(13,LOW);
  
  {
    // just print out the current temperature
    printCurrentTemp(insideThermometer);
    printCurrentTemp(outsideThermometer);
  }
  
  delay(1000);
}

I am not sure how to put a button in there and tell the code don't turn back on until I press the button.

A switch in where?

Add a boolean variable, oopsCaughtFire, with an initial value of false.

When the thermometer reports a value over some limit, set the value of oopsCaughtFire to true.

In loop, read the state of a switch. If pressed, set oopsCaughtFire to false.

Wherever it matters whether the device overheated (don't do this if...) put a if test around it:

if(!oopsCaughtFire)
{
   Do this stuff if it hasn't gotten too hot
}

Use whatever name you like for the boolean variable, as long as it is meaningful.

Please modify your post. Select all of your code, and press the # icon on the second row. The forum software treats the string of characters [, i, ] as the start of italics. That makes your code hard to read. It ignore [, i, ] and other stuff in a code block, plus it uses a smaller window with scroll bars.

Cool I will have to do some reading about boolean variables. would I put that in the code right before where I turn the auger motor on and off for a second.

would I put that in the code right before where I turn the auger motor on and off for a second.

The variable needs to be global so that any function can see it.

The value should be checked before turning the auger on.

The value should be set, to true, when the temperature gets too hot, and reset when a "reset" switch is added, and the switch is pressed.

is there anything special that I have to do to set the variable to global

is there anything special that I have to do to set the variable to global

Put it outside of any function. Typically, near the top of the program, before setup().

Here is how I altered the code and now even if I am over temp it still runs the auger motor. Thank you very much for your help

#include <OneWire.h>
#include <DallasTemperature.h>
boolean ONFIRE = false;

// Data wire is plugged into port 2 on the Arduino
#define ONE_WIRE_BUS 2

// Setup a oneWire instance to communicate with any OneWire devices (not just Maxim/Dallas temperature ICs)
OneWire oneWire(ONE_WIRE_BUS);

// Pass our oneWire reference to Dallas Temperature. 
DallasTemperature sensors(&oneWire);

// arrays to hold device addresses
DeviceAddress insideThermometer, outsideThermometer;

// function that will be called when an alarm condition exists during DallasTemperatures::processAlarms();
void newAlarmHandler(uint8_t* deviceAddress)
{
  Serial.println("Alarm Handler Start"); 
  printAlarmInfo(deviceAddress);
  printTemp(deviceAddress);
  Serial.println();
  Serial.println("Alarm Handler Finish");
}

void printCurrentTemp(DeviceAddress deviceAddress)
{
  printAddress(deviceAddress);
  printTemp(deviceAddress);
  Serial.println();
}

void printAddress(DeviceAddress deviceAddress)
{
  Serial.print("Address: ");
  for (uint8_t i = 0; i < 8; i++)
  {
    if (deviceAddress[i] < 16) Serial.print("0");
    Serial.print(deviceAddress[i], HEX);
  }
  Serial.print(" ");
}

void printTemp(DeviceAddress deviceAddress)
{
  float tempC = sensors.getTempC(deviceAddress);
  if (tempC != DEVICE_DISCONNECTED)
  {
    Serial.print("Current Temp C: ");
    Serial.print(tempC);
  }
  else Serial.print("DEVICE DISCONNECTED");
  Serial.print(" ");
}

void printAlarmInfo(DeviceAddress deviceAddress)
{
  char temp;
  printAddress(deviceAddress);
  temp = sensors.getHighAlarmTemp(deviceAddress);
  Serial.print("High Alarm: ");
  Serial.print(temp, DEC);
  Serial.print("C");
  Serial.print(" Low Alarm: ");
  temp = sensors.getLowAlarmTemp(deviceAddress);
  Serial.print(temp, DEC);
  Serial.print("C");
  Serial.print(" ");
}

void setup(void)
{
  // start serial port
  Serial.begin(9600);
  Serial.println("Dallas Temperature IC Control Library Demo");

  // Start up the library
  sensors.begin();
  
  // locate devices on the bus
  Serial.print("Found ");
  Serial.print(sensors.getDeviceCount(), DEC);
  Serial.println(" devices.");

  // search for devices on the bus and assign based on an index
  if (!sensors.getAddress(insideThermometer, 0)) Serial.println("Unable to find address for Device 0"); 
  if (!sensors.getAddress(outsideThermometer, 1)) Serial.println("Unable to find address for Device 1"); 

  Serial.print("Device insideThermometer ");
  printAlarmInfo(insideThermometer);
  Serial.println();
  
  Serial.print("Device outsideThermometer ");
  printAlarmInfo(outsideThermometer);
  Serial.println();
  
  // set alarm ranges
  Serial.println("Setting alarm temps...");
  sensors.setHighAlarmTemp(insideThermometer,22);
  sensors.setLowAlarmTemp(insideThermometer, 1);
  sensors.setHighAlarmTemp(outsideThermometer, 22);
  sensors.setLowAlarmTemp(outsideThermometer, 1);
  
  Serial.print("New insideThermometer ");
  printAlarmInfo(insideThermometer);
  Serial.println();
  
  Serial.print("New outsideThermometer ");
  printAlarmInfo(outsideThermometer);
  Serial.println();

  // attach alarm handler
  sensors.setAlarmHandler(&newAlarmHandler);
}

void loop(void)
{ 

  // ask the devices to measure the temperature
  sensors.requestTemperatures();
  
  // if an alarm condition exists as a result of the most recent 
  // requestTemperatures() request, it exists until the next time 
  // requestTemperatures() is called AND there isn't an alarm condition
  // on the device
  if (sensors.hasAlarm())
  {
   
    Serial.println("CROCK IS OVER TEMP.");
    digitalWrite(13, LOW);
  }
    if(!ONFIRE)
    {
    pinMode(13,OUTPUT);
 digitalWrite(13, HIGH);   // set the auger motor on
  delay(1000);              // wait for a second
  digitalWrite(13, LOW);    // set the auger motor off
  delay(1000);              // wait for a second
  }

  // call alarm handler function defined by sensors.setAlarmHandler
  // for each device reporting an alarm
  sensors.processAlarms();

  if (!sensors.hasAlarm())
  digitalWrite(13,LOW);
  
  {
    // just print out the current temperature
    printCurrentTemp(insideThermometer);
    printCurrentTemp(outsideThermometer);
  }
  
  delay(1000);
}
boolean ONFIRE = false;

All capital letter names are generally reserved for #define names.

I don't see where you set ONFIRE to true. This should be done when the device overheats.

If I have the code like this it dosen’t run at all. I know with your help I am close now. There is just somthing little that is missing in there.

#include <OneWire.h>
#include <DallasTemperature.h>
boolean ONFIRE = false;

// Data wire is plugged into port 2 on the Arduino
#define ONE_WIRE_BUS 2

// Setup a oneWire instance to communicate with any OneWire devices (not just Maxim/Dallas temperature ICs)
OneWire oneWire(ONE_WIRE_BUS);

// Pass our oneWire reference to Dallas Temperature. 
DallasTemperature sensors(&oneWire);

// arrays to hold device addresses
DeviceAddress insideThermometer, outsideThermometer;

// function that will be called when an alarm condition exists during DallasTemperatures::processAlarms();
void newAlarmHandler(uint8_t* deviceAddress)
{
  Serial.println("Alarm Handler Start"); 
  printAlarmInfo(deviceAddress);
  printTemp(deviceAddress);
  Serial.println();
  Serial.println("Alarm Handler Finish");
}

void printCurrentTemp(DeviceAddress deviceAddress)
{
  printAddress(deviceAddress);
  printTemp(deviceAddress);
  Serial.println();
}

void printAddress(DeviceAddress deviceAddress)
{
  Serial.print("Address: ");
  for (uint8_t i = 0; i < 8; i++)
  {
    if (deviceAddress[i] < 16) Serial.print("0");
    Serial.print(deviceAddress[i], HEX);
  }
  Serial.print(" ");
}

void printTemp(DeviceAddress deviceAddress)
{
  float tempC = sensors.getTempC(deviceAddress);
  if (tempC != DEVICE_DISCONNECTED)
  {
    Serial.print("Current Temp C: ");
    Serial.print(tempC);
  }
  else Serial.print("DEVICE DISCONNECTED");
  Serial.print(" ");
}

void printAlarmInfo(DeviceAddress deviceAddress)
{
  char temp;
  printAddress(deviceAddress);
  temp = sensors.getHighAlarmTemp(deviceAddress);
  Serial.print("High Alarm: ");
  Serial.print(temp, DEC);
  Serial.print("C");
  Serial.print(" Low Alarm: ");
  temp = sensors.getLowAlarmTemp(deviceAddress);
  Serial.print(temp, DEC);
  Serial.print("C");
  Serial.print(" ");
}

void setup(void)
{
  // start serial port
  Serial.begin(9600);
  Serial.println("Dallas Temperature IC Control Library Demo");

  // Start up the library
  sensors.begin();
  
  // locate devices on the bus
  Serial.print("Found ");
  Serial.print(sensors.getDeviceCount(), DEC);
  Serial.println(" devices.");

  // search for devices on the bus and assign based on an index
  if (!sensors.getAddress(insideThermometer, 0)) Serial.println("Unable to find address for Device 0"); 
  if (!sensors.getAddress(outsideThermometer, 1)) Serial.println("Unable to find address for Device 1"); 

  Serial.print("Device insideThermometer ");
  printAlarmInfo(insideThermometer);
  Serial.println();
  
  Serial.print("Device outsideThermometer ");
  printAlarmInfo(outsideThermometer);
  Serial.println();
  
  // set alarm ranges
  Serial.println("Setting alarm temps...");
  sensors.setHighAlarmTemp(insideThermometer,22);
  sensors.setLowAlarmTemp(insideThermometer, 1);
  sensors.setHighAlarmTemp(outsideThermometer, 22);
  sensors.setLowAlarmTemp(outsideThermometer, 1);
  
  Serial.print("New insideThermometer ");
  printAlarmInfo(insideThermometer);
  Serial.println();
  
  Serial.print("New outsideThermometer ");
  printAlarmInfo(outsideThermometer);
  Serial.println();

  // attach alarm handler
  sensors.setAlarmHandler(&newAlarmHandler);
}

void loop(void)
{ 

  // ask the devices to measure the temperature
  sensors.requestTemperatures();
  
  // if an alarm condition exists as a result of the most recent 
  // requestTemperatures() request, it exists until the next time 
  // requestTemperatures() is called AND there isn't an alarm condition
  // on the device
  if (sensors.hasAlarm())
  {
   
    Serial.println("CROCK IS OVER TEMP.");
    digitalWrite(13, LOW);
  }
    if(!ONFIRE)
    {
      digitalWrite(13,LOW);
    }
    else
    {
    pinMode(13,OUTPUT);
 digitalWrite(13, HIGH);   // set the auger motor on
  delay(1000);              // wait for a second
  digitalWrite(13, LOW);    // set the auger motor off
  delay(1000);              // wait for a second
  }

  // call alarm handler function defined by sensors.setAlarmHandler
  // for each device reporting an alarm
  sensors.processAlarms();

  if (!sensors.hasAlarm())
  digitalWrite(13,LOW);
  
  {
    // just print out the current temperature
    printCurrentTemp(insideThermometer);
    printCurrentTemp(outsideThermometer);
  }
  
  delay(1000);
}

Where I have it turning on is twords the bottom of the code. For some reason with how I have it now the auger dosent come on at all.

#include <OneWire.h>
#include <DallasTemperature.h>
boolean OnFire = false;

// Data wire is plugged into port 2 on the Arduino
#define ONE_WIRE_BUS 2

// Setup a oneWire instance to communicate with any OneWire devices (not just Maxim/Dallas temperature ICs)
OneWire oneWire(ONE_WIRE_BUS);

// Pass our oneWire reference to Dallas Temperature. 
DallasTemperature sensors(&oneWire);

// arrays to hold device addresses
DeviceAddress insideThermometer, outsideThermometer;

// function that will be called when an alarm condition exists during DallasTemperatures::processAlarms();
void newAlarmHandler(uint8_t* deviceAddress)
{
  Serial.println("Alarm Handler Start"); 
  printAlarmInfo(deviceAddress);
  printTemp(deviceAddress);
  Serial.println();
  Serial.println("Alarm Handler Finish");
}

void printCurrentTemp(DeviceAddress deviceAddress)
{
  printAddress(deviceAddress);
  printTemp(deviceAddress);
  Serial.println();
}

void printAddress(DeviceAddress deviceAddress)
{
  Serial.print("Address: ");
  for (uint8_t i = 0; i < 8; i++)
  {
    if (deviceAddress[i] < 16) Serial.print("0");
    Serial.print(deviceAddress[i], HEX);
  }
  Serial.print(" ");
}

void printTemp(DeviceAddress deviceAddress)
{
  float tempC = sensors.getTempC(deviceAddress);
  if (tempC != DEVICE_DISCONNECTED)
  {
    Serial.print("Current Temp C: ");
    Serial.print(tempC);
  }
  else Serial.print("DEVICE DISCONNECTED");
  Serial.print(" ");
}

void printAlarmInfo(DeviceAddress deviceAddress)
{
  char temp;
  printAddress(deviceAddress);
  temp = sensors.getHighAlarmTemp(deviceAddress);
  Serial.print("High Alarm: ");
  Serial.print(temp, DEC);
  Serial.print("C");
  Serial.print(" Low Alarm: ");
  temp = sensors.getLowAlarmTemp(deviceAddress);
  Serial.print(temp, DEC);
  Serial.print("C");
  Serial.print(" ");
}

void setup(void)
{
  // start serial port
  Serial.begin(9600);
  Serial.println("Dallas Temperature IC Control Library Demo");

  // Start up the library
  sensors.begin();
  
  // locate devices on the bus
  Serial.print("Found ");
  Serial.print(sensors.getDeviceCount(), DEC);
  Serial.println(" devices.");

  // search for devices on the bus and assign based on an index
  if (!sensors.getAddress(insideThermometer, 0)) Serial.println("Unable to find address for Device 0"); 
  if (!sensors.getAddress(outsideThermometer, 1)) Serial.println("Unable to find address for Device 1"); 

  Serial.print("Device insideThermometer ");
  printAlarmInfo(insideThermometer);
  Serial.println();
  
  Serial.print("Device outsideThermometer ");
  printAlarmInfo(outsideThermometer);
  Serial.println();
  
  // set alarm ranges
  Serial.println("Setting alarm temps...");
  sensors.setHighAlarmTemp(insideThermometer,22);
  sensors.setLowAlarmTemp(insideThermometer, 1);
  sensors.setHighAlarmTemp(outsideThermometer, 22);
  sensors.setLowAlarmTemp(outsideThermometer, 1);
  
  Serial.print("New insideThermometer ");
  printAlarmInfo(insideThermometer);
  Serial.println();
  
  Serial.print("New outsideThermometer ");
  printAlarmInfo(outsideThermometer);
  Serial.println();

  // attach alarm handler
  sensors.setAlarmHandler(&newAlarmHandler);
}

void loop(void)
{ 

  // ask the devices to measure the temperature
  sensors.requestTemperatures();
  
  // if an alarm condition exists as a result of the most recent 
  // requestTemperatures() request, it exists until the next time 
  // requestTemperatures() is called AND there isn't an alarm condition
  // on the device
  if (sensors.hasAlarm())
  { 
    Serial.println("CROCK IS OVER TEMP.");
  }
    if(!OnFire)
    {
      boolean OnFire = true;
      digitalWrite(13,LOW);
    }
    else
    {
    pinMode(13,OUTPUT);
 digitalWrite(13, HIGH);   // set the auger motor on
  delay(1000);              // wait for a second
  digitalWrite(13, LOW);    // set the auger motor off
  delay(1000);              // wait for a second
  }

  // call alarm handler function defined by sensors.setAlarmHandler
  // for each device reporting an alarm
  sensors.processAlarms();

  if (!sensors.hasAlarm())
  digitalWrite(13,LOW);
  
  {
    // just print out the current temperature
    printCurrentTemp(insideThermometer);
    printCurrentTemp(outsideThermometer);
  }
  
  delay(1000);
}
    if(!OnFire)
    {
      boolean OnFire = true;

Creating another (local) variable of the same name accomplishes nothing. This is not where you want to set OnFire to true.

The function newAlarmHandler() gets called when the temperature exceeds your set values. It is in this function that you want to set the global variable, OnFire, to true. Or in this if block:

  if (sensors.hasAlarm())
  { 
    Serial.println("CROCK IS OVER TEMP.");
  }

I think I have it how you are saying. Sorry for being so new to programming. How it is right now the auger goes off when it is over temp but comes back on when its back within the range. =(

#include <OneWire.h>
#include <DallasTemperature.h>
boolean OnFire = false;

// Data wire is plugged into port 2 on the Arduino
#define ONE_WIRE_BUS 2

// Setup a oneWire instance to communicate with any OneWire devices (not just Maxim/Dallas temperature ICs)
OneWire oneWire(ONE_WIRE_BUS);

// Pass our oneWire reference to Dallas Temperature. 
DallasTemperature sensors(&oneWire);

// arrays to hold device addresses
DeviceAddress insideThermometer, outsideThermometer;

// function that will be called when an alarm condition exists during DallasTemperatures::processAlarms();
void newAlarmHandler(uint8_t* deviceAddress)
{
  Serial.println("Alarm Handler Start"); 
  printAlarmInfo(deviceAddress);
  printTemp(deviceAddress);
  Serial.println();
  Serial.println("Alarm Handler Finish");
}

void printCurrentTemp(DeviceAddress deviceAddress)
{
  printAddress(deviceAddress);
  printTemp(deviceAddress);
  Serial.println();
}

void printAddress(DeviceAddress deviceAddress)
{
  Serial.print("Address: ");
  for (uint8_t i = 0; i < 8; i++)
  {
    if (deviceAddress[i] < 16) Serial.print("0");
    Serial.print(deviceAddress[i], HEX);
  }
  Serial.print(" ");
}

void printTemp(DeviceAddress deviceAddress)
{
  float tempC = sensors.getTempC(deviceAddress);
  if (tempC != DEVICE_DISCONNECTED)
  {
    Serial.print("Current Temp C: ");
    Serial.print(tempC);
  }
  else Serial.print("DEVICE DISCONNECTED");
  Serial.print(" ");
}

void printAlarmInfo(DeviceAddress deviceAddress)
{
  char temp;
  printAddress(deviceAddress);
  temp = sensors.getHighAlarmTemp(deviceAddress);
  Serial.print("High Alarm: ");
  Serial.print(temp, DEC);
  Serial.print("C");
  Serial.print(" Low Alarm: ");
  temp = sensors.getLowAlarmTemp(deviceAddress);
  Serial.print(temp, DEC);
  Serial.print("C");
  Serial.print(" ");
}

void setup(void)
{
  // start serial port
  Serial.begin(9600);
  Serial.println("Dallas Temperature IC Control Library Demo");

  // Start up the library
  sensors.begin();
  
  // locate devices on the bus
  Serial.print("Found ");
  Serial.print(sensors.getDeviceCount(), DEC);
  Serial.println(" devices.");

  // search for devices on the bus and assign based on an index
  if (!sensors.getAddress(insideThermometer, 0)) Serial.println("Unable to find address for Device 0"); 
  if (!sensors.getAddress(outsideThermometer, 1)) Serial.println("Unable to find address for Device 1"); 

  Serial.print("Device insideThermometer ");
  printAlarmInfo(insideThermometer);
  Serial.println();
  
  Serial.print("Device outsideThermometer ");
  printAlarmInfo(outsideThermometer);
  Serial.println();
  
  // set alarm ranges
  Serial.println("Setting alarm temps...");
  sensors.setHighAlarmTemp(insideThermometer,22);
  sensors.setLowAlarmTemp(insideThermometer, 1);
  sensors.setHighAlarmTemp(outsideThermometer, 22);
  sensors.setLowAlarmTemp(outsideThermometer, 1);
  
  Serial.print("New insideThermometer ");
  printAlarmInfo(insideThermometer);
  Serial.println();
  
  Serial.print("New outsideThermometer ");
  printAlarmInfo(outsideThermometer);
  Serial.println();

  // attach alarm handler
  sensors.setAlarmHandler(&newAlarmHandler);
}

void loop(void)
{ 

  // ask the devices to measure the temperature
  sensors.requestTemperatures();
  
  // if an alarm condition exists as a result of the most recent 
  // requestTemperatures() request, it exists until the next time 
  // requestTemperatures() is called AND there isn't an alarm condition
  // on the device
  if (sensors.hasAlarm())
  { 
    Serial.println("CROCK IS OVER TEMP.");
    if(!OnFire)
    digitalWrite(13,LOW);
  }
  else
  {
  pinMode(13,OUTPUT);
 digitalWrite(13, HIGH);   // set the auger motor on
  delay(1000);              // wait for a second
  digitalWrite(13, LOW);    // set the auger motor off
  delay(1000);              // wait for a second
  }

  // call alarm handler function defined by sensors.setAlarmHandler
  // for each device reporting an alarm
  sensors.processAlarms();

  if (!sensors.hasAlarm())
  digitalWrite(13,LOW);
  
  {
    // just print out the current temperature
    printCurrentTemp(insideThermometer);
    printCurrentTemp(outsideThermometer);
  }
  
  delay(1000);
}

I guess what I am looking for is how do I void the loop. So it dosent turn the auger on and off anymore if it sees the boolean as having been set to true even if it is back to being within the acceptable tempreture range after it cools down. I hope this makes since. Thank you so much for your help

  if (sensors.hasAlarm())
  { 
    Serial.println("CROCK IS OVER TEMP.");
    if(!OnFire)
    digitalWrite(13,LOW);
  }

This only turns pin 13 off if the temperature has been exceeded. It should be:

  if (sensors.hasAlarm())
  { 
    Serial.println("CROCK IS OVER TEMP.");
    OnFire = true;
  }

This:

  else
  {
  pinMode(13,OUTPUT);
 digitalWrite(13, HIGH);   // set the auger motor on
  delay(1000);              // wait for a second
  digitalWrite(13, LOW);    // set the auger motor off
  delay(1000);              // wait for a second
  }

should be:

  if(!OnFire)
  {
  pinMode(13,OUTPUT);
 digitalWrite(13, HIGH);   // set the auger motor on
  delay(1000);              // wait for a second
  digitalWrite(13, LOW);    // set the auger motor off
  delay(1000);              // wait for a second
  }

Wow that is amazing thank you very much. If you ever need anything welded or( welding engineering advice) or cnc machined feel free to shoot me an email and I will take care of you.

Thank you very much that worked perfectly.