Created
November 25, 2017 03:37
-
-
Save esmarr58/44b2dc0749979b57dd1372e8596f131d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int lecturaADC = 0; | |
void setup() { | |
pinMode(12,OUTPUT); //Salida a Alarma, aun sin uso | |
Serial.begin(9600); | |
} | |
void loop() { | |
/* | |
* #1 | |
Lectura del canal 0 del ADC, | |
recordando que el ADC de Arduino | |
es de 10 Bits, el resultado se guardara | |
en una variable int (16 bits). | |
*/ | |
lecturaADC = analogRead(A0); | |
/* | |
* Se imprime el valor despues del siguiente texto. | |
*/ | |
Serial.print("El valor binario de salida en el sensor es: "); | |
Serial.println(lecturaADC); | |
/* | |
* Retardo de 3 segundos entre medicion. | |
*/ | |
delay(3000); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment