Вс авг 20, 2017 12:34:28
#include "max6675.h"
int thermoDO = 2; //он же SO
int thermoCS = 3;
int thermoCLK = 4; //он же SCK
MAX6675 thermocouple(thermoCLK, thermoCS, thermoDO);
int vccPin = 5; //пин для питания
int gndPin = 6; //пин для земли
void setup() {
Serial.begin(9600);
//активируем питание и землю
pinMode(vccPin, OUTPUT); digitalWrite(vccPin, HIGH);
pinMode(gndPin, OUTPUT); digitalWrite(gndPin, LOW);
Serial.println("MAX6675 test");
//ждем стабилизации чипа MAX
delay(500);
}
void loop() {
//Выводим показания в монитор порта
Serial.print("C = ");
Serial.print(thermocouple.readCelsius());
Serial.print("; F = ");
Serial.println(thermocouple.readFahrenheit());
delay(300);
}
Вс авг 20, 2017 15:17:55
Ср авг 23, 2017 17:46:46