Last active
November 16, 2017 18:33
-
-
Save Krimsit/98118646b1f23384c9bb238aaf53c0e6 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 led = require("@amperka/led").connect(P5); | |
var ir = require("@amperka/ir-receiver").connect(P2); | |
ir.on("receive", function(code, repeat){ | |
console.log(code.toString(16)); | |
if(code.toString(16) == "3fcc33f"){ | |
led.toggle(); | |
} | |
else{ | |
console.log("Error, fubction is not found!"); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment