Skip to content

Instantly share code, notes, and snippets.

@houmei
Last active June 29, 2016 20:57
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
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