Created
August 8, 2012 03:20
-
-
Save brooksware2000/3291737 to your computer and use it in GitHub Desktop.
Sample sketch for the AD595 Thermocouple sensor.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
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