From bdd0d229fd9ad328ea82007f1c689dcece419b9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Bail=C3=B3n=20Bustos?= Date: Sat, 8 Apr 2023 17:13:02 -0600 Subject: [PATCH] =?UTF-8?q?Anexa=20lectura=20de=20activaci=C3=B3n=20transi?= =?UTF-8?q?stor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lecturaArduino/lecturaArduino.ino | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 lecturaArduino/lecturaArduino.ino diff --git a/lecturaArduino/lecturaArduino.ino b/lecturaArduino/lecturaArduino.ino new file mode 100644 index 0000000..462244a --- /dev/null +++ b/lecturaArduino/lecturaArduino.ino @@ -0,0 +1,20 @@ +#define in1 A0 + +float temp1, lectura1; + +void setup() { + // put your setup code here, to run once: + Serial.begin(9600); + pinMode(in1, INPUT); +} + +void loop() { + // put your main code here, to run repeatedly: + lectura1 = analogRead(in1); + temp1 = (lectura1 * 5000 / 1023 / 10) - 40; + Serial.print(temp1); + + + delay(800); +} +