Skip to content

Instantly share code, notes, and snippets.

@margmarg
Created October 7, 2020 07:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save margmarg/6d94387e9233d2829539b47eb93ab8f9 to your computer and use it in GitHub Desktop.
Save margmarg/6d94387e9233d2829539b47eb93ab8f9 to your computer and use it in GitHub Desktop.
Tuesday_class_07.ino
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
int sensorValue = analogRead(A0);
Serial.println(sensorValue);
if (sensorValue > 300) {
Serial.println("Yay!");
delay(1000); //watch the values
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment