Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Example sketch for the MAX6675 Type-K Thermocouple sensor
/*
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