Advertisement
Guest User

Untitled

a guest
Dec 7th, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. void loop()
  2. {
  3. if(safeToRun){
  4. double temp = thermocouple.readCelsius();
  5. if(isnan(temp))
  6. {
  7. temp = -100.0;
  8. Output = 0;
  9. safeToRun = false;
  10. sendTemp(temp);
  11. sendOutput();
  12. }
  13. Input = temp;
  14. //Input = thermocouple.readCelsius();
  15. if(safeToRun){
  16. myPID.Compute();
  17. }
  18. if (millis() - lastRun > pausetime)
  19. { //time to shift the Relay Window
  20. lastRun = millis();
  21. sendTemp(Input);
  22. sendOutput();
  23. sendInternTemp(thermocouple.readInternal());
  24. }
  25. updateOutput(Output);
  26. }
  27. nexLoop(nex_listen_list);
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement