Example Lcdthermocouple (Pde)
Example Lcdthermocouple (Pde)
// www.ladyada.net/learn/sensors/thermocouple
#include <max6675.h>
#include <LiquidCrystal.h>
#include <Wire.h>
int thermoDO = 4;
int thermoCS = 5;
int thermoCLK = 6;
void setup() {
Serial.begin(9600);
// use Arduino pins
pinMode(vccPin, OUTPUT); digitalWrite(vccPin, HIGH);
pinMode(gndPin, OUTPUT); digitalWrite(gndPin, LOW);
lcd.begin(16, 2);
lcd.createChar(0, degree);
void loop() {
// basic readout test, just print the current temp
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("MAX6675 test");
// go to line #1
lcd.setCursor(0,1);
lcd.print(thermocouple.readCelsius());
#if ARDUINO >= 100
lcd.write((byte)0);
#else
lcd.print(0, BYTE);
#endif
lcd.print("C ");
lcd.print(thermocouple.readFahrenheit());
#if ARDUINO >= 100
lcd.write((byte)0);
#else
lcd.print(0, BYTE);
#endif
lcd.print('F');
delay(1000);
}
Desktop version