From 299ee1066f15506da34beeba6e90a44891780734 Mon Sep 17 00:00:00 2001 From: Luca Tringali Date: Mon, 11 Mar 2019 22:38:22 +0100 Subject: First commit --- temperatura-lm35.ino | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 temperatura-lm35.ino (limited to 'temperatura-lm35.ino') 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); +} -- cgit v1.1