Skip to content

Instantly share code, notes, and snippets.

@docmarionum1
Created May 24, 2016 19:43
Show Gist options
  • Save docmarionum1/1866a1caaa9d68f831a824365cd16e4a to your computer and use it in GitHub Desktop.
Save docmarionum1/1866a1caaa9d68f831a824365cd16e4a to your computer and use it in GitHub Desktop.
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