Skip to content

Instantly share code, notes, and snippets.

@brooksware2000
Created August 8, 2012 03:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brooksware2000/3291737 to your computer and use it in GitHub Desktop.
Save brooksware2000/3291737 to your computer and use it in GitHub Desktop.
Sample sketch for the AD595 Thermocouple sensor.
/*
Demonstration sketch for Hobbybotics AD595 Thermocouple breakout board.
Reads temperature from AD595 in Celsius and Fahrenheit. Prints results to serial monitor.
*/
#include <AD595.h>
AD595 thermocouple;
void setup() {
Serial.begin(9600);
thermocouple.init(0);
Serial.println("AD595 test");
// wait for AD595 chip to stabilize
delay(500);
}
void loop() {
// basic readout test, just print the current temp
Serial.print("C = ");
Serial.println(float(thermocouple.measure(TEMPC)));
Serial.print("F = ");
Serial.println(float(thermocouple.measure(TEMPF)));
delay(1000);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment