summaryrefslogtreecommitdiff
path: root/2-temperatura-lm35.ino
blob: a75cb282a9053b6b8abd190922a022e1671b60d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
int pin = 1;
double temp = 0.0;

void setup(){
  Serial.begin(9600);
}

void loop(){
  temp = analogRead(pin)*(500/1023);
  Serial.print ("Stanza 1: ");
  Serial.print (temp);
  Serial.print ("° C");
  Serial.println();
  delay(1000);
}