Advertisement
Guest User

Untitled

a guest
Oct 7th, 2015
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. float temp;
  2. int tempPin = 0;
  3.  
  4. void setup()
  5.  
  6. {
  7.  
  8. Serial.begin(9600);
  9.  
  10. }
  11.  
  12. void loop()
  13.  
  14. {
  15.  
  16. temp = analogRead(tempPin);
  17.  
  18. temp = temp * 0.48828125;
  19.  
  20.  
  21. Serial.print(temp);
  22.  
  23. Serial.print(" °C");
  24.  
  25. Serial.println();
  26.  
  27. delay(1000);
  28.  
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement