Created
August 9, 2012 00:12
-
-
Save brooksware2000/3299892 to your computer and use it in GitHub Desktop.
Example sketch for the MAX6675 Type-K 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 MAX6675 Thermocouple breakout board. | |
Reads temperature from MAX6675 in celsius and fahrenheit. Prints results to serial monitor. | |
*/ | |
#include <MAX6675.h> | |
MAX6675 thermocouple; | |
void setup() { | |
Serial.begin(9600); | |
thermocouple.init(4, 5, 6); | |
Serial.println("MAX6675 test"); | |
// wait for MAX 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