stickyBUG Code

The following sample code requires the thermoBUG library.


// import library
#include "thermoBUG.h"

// create thermoBUG object...
thermoBUG thermo = thermoBUG();

// program initialisation...
void setup() {
  Serial.begin(9600);   // init serial baudrate
  delay(500);           // wait for thermocouple to stabilise
}

// program entry point...
void loop() {

   // the max31855 has an internal temperature sensor, so get
   // value and output to the screen...
   Serial.print("internal     : ");
   Serial.print(thermo.readInternal());
   Serial.println(" degC");

   // now read the thermocouple value and output...
   Serial.print("thermocouple : ");
   Serial.print(thermo.readCelsius());
   Serial.println(" degC");
   delay(1000);
}