Commit db501df728c29d3fb609528a8797a49f6693d715

Authored by henyxia
0 parents

First version

Security check with PIN1
Showing 2 changed files with 19 additions and 0 deletions   Show diff stats
README.md 0 → 100644
  1 +++ a/README.md
... ... @@ -0,0 +1,2 @@
  1 +# tweekd_arduino
  2 +Please consult the tweekd project for more information
... ...
main.ino 0 → 100644
  1 +++ a/main.ino
... ... @@ -0,0 +1,17 @@
  1 +int led = 7;
  2 +int ctrl = 8;
  3 +
  4 +void setup()
  5 +{
  6 + pinMode(led, OUTPUT);
  7 + pinMode(ctrl, INPUT);
  8 +}
  9 +
  10 +void loop()
  11 +{
  12 + if(digitalRead(ctrl) == HIGH)
  13 + digitalWrite(led, LOW);
  14 + else
  15 + digitalWrite(led, HIGH);
  16 + delay(1000);
  17 +}
... ...