-
-
Save oimou/b21b40f3275efea157c0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ua = require("universal-analytics"); | |
var j5 = require("johnny-five"); | |
var visitor = ua("UA-XXXX-XX"); | |
var arduino = new j5.Board({ | |
repl: false | |
}); | |
arduino.on("ready", function () { | |
var btn = new j5.Button(2); | |
btn.on("up", function () { | |
console.log("event sent"); | |
visitor.event("arduino", "click").send(); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment