djkvidp

Untitled

Nov 14th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. #include <MAX6675_Thermocouple.h>
  2.  
  3. #define SCK_PIN 14 //(D5)
  4. #define CS_PIN 4 //(D2)
  5. #define SO_PIN 5 //(D1)
  6. #define CS2_PIN 0 //(D3)
  7.  
  8. MAX6675_Thermocouple* thermocouple = NULL;
  9. MAX6675_Thermocouple* thermocouple2 = NULL;
  10.  
  11.  
  12. void setup() {
  13. Serial.begin(115200);
  14. thermocouple = new MAX6675_Thermocouple(SCK_PIN, CS_PIN, SO_PIN);
  15. thermocouple2 = new MAX6675_Thermocouple(SCK_PIN, CS2_PIN, SO_PIN);
  16. }
  17.  
  18. // the loop function runs over and over again forever
  19. void loop() {
  20. const double celsius = thermocouple->readCelsius();
  21. const double celsius2 = thermocouple2->readCelsius();
  22.  
  23. Serial.println("Teplota senzor 1: ");
  24. Serial.println(String(celsius) + " C, ");
  25. Serial.println("Teplota senzor 2: ");
  26. Serial.println(String(celsius2) + " C, ");
  27.  
  28.  
  29.  
  30. delay(2000);
  31. }
Add Comment
Please, Sign In to add comment