/*Source: www.theorycircuit.com*/ int val; int tempPin = 1; void setup() { Serial.begin(9600); } void loop() { val = analogRead(tempPin); float mv = ( val/1024.0)*5000; float cel = mv/10; float farh = (cel*9)/5 + 32; Serial.print("TEMPRATURE = "); Serial.print(cel); Serial.print("*C"); Serial.println(); delay(1000); /* uncomment this to get temperature in farenhite Serial.print("TEMPRATURE = "); Serial.print(farh); Serial.print("*F"); Serial.println(); */ } --------------------------------------------------------------------------------------------------------------
  1. /*Source: www.theorycircuit.com*/
  2. int val;
  3. int tempPin = 1;
  4. void setup()
  5. {
  6. Serial.begin(9600);
  7. }
  8. void loop()
  9. {
  10. val = analogRead(tempPin);
  11. float mv = ( val/1024.0)*5000;
  12. float cel = mv/10;
  13. float farh = (cel*9)/5 + 32;
  14. Serial.print("TEMPRATURE = ");
  15. Serial.print(cel);
  16. Serial.print("*C");
  17. Serial.println();
  18. delay(1000);
  19. /* uncomment this to get temperature in farenhite
  20. Serial.print("TEMPRATURE = ");
  21. Serial.print(farh);
  22. Serial.print("*F");
  23. Serial.println();
  24. */
  25. }
------------------------------------------------------------------------------------------------------------
  1. /*Source: www.theorycircuit.com*/
  2. int val;
  3. int tempPin = 1;
  4. void setup()
  5. {
  6. Serial.begin(9600);
  7. }
  8. void loop()
  9. {
  10. val = analogRead(tempPin);
  11. float mv = ( val/1024.0)*5000;
  12. float cel = mv/10;
  13. float farh = (cel*9)/5 + 32;
  14. Serial.print("TEMPRATURE = ");
  15. Serial.print(cel);
  16. Serial.print("*C");
  17. Serial.println();
  18. delay(1000);
  19. /* uncomment this to get temperature in farenhite
  20. Serial.print("TEMPRATURE = ");
  21. Serial.print(farh);
  22. Serial.print("*F");
  23. Serial.println();
  24. */
  25. }