mpmcws

LM35DZ

Jul 14th, 2018
77
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // LM 35 DZ
  2. //Marco C. luglio 2018 code open source
  3. void setup()
  4. {
  5.   Serial.begin(9600);
  6.   analogReference(INTERNAL);
  7. }
  8. void loop ()
  9. {
  10.   int aRead = 0;
  11.   float ref = 1.1;
  12.   aRead = analogRead(A0);
  13.   float tempC = aRead * ref / 1023 * 100;
  14.   float volt = aRead * ref / 1023;
  15.   Serial.print(" T = ");
  16.   Serial.println(tempC);
  17.   delay(1000);
  18. }
RAW Paste Data