Skip to content

Instantly share code, notes, and snippets.

@arduinothai
Created May 16, 2018 09:40
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save arduinothai/aa6b3656b2c146ee6a597c8a85bccbf7 to your computer and use it in GitHub Desktop.
#include "max6675.h"
int ktcSO = 8;
int ktcCS = 9;
int ktcCLK = 10;
MAX6675 ktc(ktcCLK, ktcCS, ktcSO);
void setup() {
Serial.begin(9600);
// give the MAX a little time to settle
delay(500);
}
void loop() {
// basic readout test
Serial.print("Deg C = ");
Serial.print(ktc.readCelsius());
Serial.print("\t Deg F = ");
Serial.println(ktc.readFahrenheit());
delay(500);
}
// ที่มา http://henrysbench.capnfatz.com/henrys-bench/arduino-temperature-measurements/max6675-temp-module-arduino-manual-and-tutorial/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment