diff options
Diffstat (limited to 'temperatura-lm35.ino')
-rw-r--r-- | temperatura-lm35.ino | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/temperatura-lm35.ino b/temperatura-lm35.ino new file mode 100644 index 0000000..a75cb28 --- /dev/null +++ b/temperatura-lm35.ino @@ -0,0 +1,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); +} |