Skip to content

Instantly share code, notes, and snippets.

@stenehall
Created April 20, 2015 05:26
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 stenehall/8733ea7d481faaf38b7a to your computer and use it in GitHub Desktop.
Save stenehall/8733ea7d481faaf38b7a to your computer and use it in GitHub Desktop.
int pin = A0;
void setup() {
}
void loop() {
int newVal = analogRead(A0);
if(newVal > 300) {
Spark.publish("brew_active", String(random(50000)), 60, PRIVATE);
}
delay(10000);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment