Last active
June 29, 2016 20:57
-
-
Save houmei/117544cfdc5a11e7163f9f2babdd8533 to your computer and use it in GitHub Desktop.
Digispark TEST
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define LED 1 | |
#define PIR 2 | |
void setup() { | |
pinMode(LED, OUTPUT); | |
pinMode(PIR,INPUT); | |
} | |
int a; | |
void loop() { | |
a = digitalRead(PIR); | |
digitalWrite(LED, a); | |
delay(500); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment