Skip to content

Instantly share code, notes, and snippets.

@houmei
Last active June 29, 2016 20:57
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 houmei/117544cfdc5a11e7163f9f2babdd8533 to your computer and use it in GitHub Desktop.
Save houmei/117544cfdc5a11e7163f9f2babdd8533 to your computer and use it in GitHub Desktop.
Digispark TEST
#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