Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add blinking example

  • Loading branch information...
commit c7486b7c8fbd0dfdcb36ffa2ee3a297417d46bcb 1 parent 981df1e
@Soarez authored
Showing with 14 additions and 0 deletions.
  1. +14 −0 examples/blink.js
View
14 examples/blink.js
@@ -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);
Please sign in to comment.
Something went wrong with that request. Please try again.