Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //https://randomnerdtutorials.com/arduino-k-type-thermocouple-max6675/#:~:text=A%20K%2Dtype%20thermocouple%20is,readings%20in%20the%20Serial%20Monitor.
- #include <Wire.h>
- #include <LiquidCrystal_I2C.h>
- #include "max6675.h"
- int thermoDO = 4;
- int thermoCS = 5;
- int thermoCLK = 6;
- MAX6675 thermocouple(thermoCLK, thermoCS, thermoDO);
- LiquidCrystal_I2C lcd(0x27, 16, 2);
- void setup() {
- Serial.begin(9600);
- lcd.init();
- lcd.init();
- lcd.backlight();
- lcd.setCursor(0, 0);
- Serial.println("MAX6675 test");
- delay(500);
- }
- void loop() {
- Serial.print("C = ");
- Serial.println(thermocouple.readCelsius());
- lcd.print(thermocouple.readCelsius());
- //Serial.print("F = ");
- //Serial.println(thermocouple.readFahrenheit());
- delay(1000);//250mS at least between readings
- lcd.clear();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement