Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <MAX6675_Thermocouple.h>
- #define SCK_PIN 14 //(D5)
- #define CS_PIN 4 //(D2)
- #define SO_PIN 5 //(D1)
- #define CS2_PIN 0 //(D3)
- MAX6675_Thermocouple* thermocouple = NULL;
- MAX6675_Thermocouple* thermocouple2 = NULL;
- void setup() {
- Serial.begin(115200);
- thermocouple = new MAX6675_Thermocouple(SCK_PIN, CS_PIN, SO_PIN);
- thermocouple2 = new MAX6675_Thermocouple(SCK_PIN, CS2_PIN, SO_PIN);
- }
- // the loop function runs over and over again forever
- void loop() {
- const double celsius = thermocouple->readCelsius();
- const double celsius2 = thermocouple2->readCelsius();
- Serial.println("Teplota senzor 1: ");
- Serial.println(String(celsius) + " C, ");
- Serial.println("Teplota senzor 2: ");
- Serial.println(String(celsius2) + " C, ");
- delay(2000);
- }
Add Comment
Please, Sign In to add comment