Skip to content

Instantly share code, notes, and snippets.

@jakerb
Created March 26, 2020 15:23
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 jakerb/2a6f82ccff55ab40a49ff8fce2da31a2 to your computer and use it in GitHub Desktop.
Save jakerb/2a6f82ccff55ab40a49ff8fce2da31a2 to your computer and use it in GitHub Desktop.
#include <Bridge.h>
#include <HttpClient.h>
const int buttonPin = 2;
void setup() {
pinMode(buttonPin, INPUT);
}
void loop() {
HttpClient client;
buttonState = digitalRead(buttonPin);
if (buttonState == HIGH) {
// Send GET request to a custom URL to +1
client.get("http://pearsonevents.co.uk/arduino/press.php");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment