Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
#define PIN_INT 2
#define PIN_LED 13
void setup() {
// put your setup code here, to run once:
pinMode( PIN_LED, OUTPUT );
pinMode( PIN_INT, INPUT );
digitalWrite( PIN_LED, LOW );
void loop() {
digitalWrite( PIN_LED, digitalRead( PIN_INT ) ? HIGH : LOW );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment