Created
August 29, 2015 20:22
-
-
Save ThomasLengeling/9e1ad1ef00dcdcf4cd6d 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
float promedio; | |
float value; | |
int counter = 0; | |
int numDatos = 50; | |
void loop(){ | |
float inValue = analogRead(PIN); | |
promedio += inValue; | |
counter++; | |
if(counter == numDatos){ | |
value = promedio / numDatos; | |
counter=0; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment