Created
May 24, 2016 19:43
-
-
Save docmarionum1/1866a1caaa9d68f831a824365cd16e4a to your computer and use it in GitHub Desktop.
This file contains hidden or 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
void setup() { | |
// put your setup code here, to run once: | |
Serial.begin(9600); | |
pinMode(13, OUTPUT); | |
} | |
void loop() { | |
// put your main code here, to run repeatedly: | |
int sensorValue = analogRead(A5); | |
Serial.println(sensorValue); | |
if (sensorValue < 500) { | |
digitalWrite(13, HIGH); | |
} else { | |
digitalWrite(13, LOW); | |
} | |
delay(100); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment