Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "max6675.h"
- int thermoDO = 11;
- int thermoCS = 12;
- int thermoCLK = 6;
- MAX6675 thermocouple(thermoCLK, thermoCS, thermoDO);
- #define rele 13
- int minhaTemp = 0;
- //-------------------------------------------------------------------------
- void setup() {
- Serial.begin(9600);
- pinMode(rele, OUTPUT);
- Serial.println("MAX6675 test");
- // wait for MAX chip to stabilize
- delay(500);
- }
- //-------------------------------------------------------------------------
- void loop() {
- Serial.print("C = ");
- minhaTemp = thermocouple.readCelsius();
- Serial.println(minhaTemp);
- if (minhaTemp < 133)
- digitalWrite(rele, LOW);
- if (minhaTemp > 135)
- digitalWrite(rele, HIGH);
- delay(1000);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement