Permalink
Browse files

Add blinking example

  • Loading branch information...
Soarez committed Dec 20, 2012
1 parent 981df1e commit c7486b7c8fbd0dfdcb36ffa2ee3a297417d46bcb
Showing with 14 additions and 0 deletions.
  1. +14 −0 examples/blink.js
View
@@ -0,0 +1,14 @@
+var wpi = require('../lib/exports');
+
+wpi.setup();
+
+var pin = 0;
+
+wpi.pinMode(0, wpi.modes.OUTPUT);
+
+var value = 1;
+
+setInterval(function() {
+ wpi.digitalWrite(pin, value);
+ value = +!value;
+}, 500);

0 comments on commit c7486b7

Please sign in to comment.