This file contains hidden or 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
# install missing libraries (if any) | |
cd ~ | |
sudo yum update | |
yum install java-1.7.0-openjdk.x86_64 | |
yum install unzip | |
yum install mc | |
yum install wget | |
yum install curl | |
# get and unpack elasticsearch zip file |
This file contains hidden or 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 get16BitsComplement = function (number) { | |
return number; | |
}; | |
var factor = 1000; | |
var headerBytes = [4434 / factor, get16BitsComplement(-4424 / factor)]; | |
var oneOnDuration = 560 / factor; | |
var zeroOnDuration = 560 / factor; | |
var oneOffDuration = get16BitsComplement(-1617 / factor); | |
var zeroOffDuration = get16BitsComplement(-528 / factor); |
This file contains hidden or 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 get16BitsComplement = function (number) { | |
return number; | |
}; | |
var factor = 1000; | |
var headerBytes = [2400 / factor, get16BitsComplement(-600 / factor)]; | |
var oneOnDuration = 1200 / factor; | |
var zeroOnDuration = 600 / factor; | |
var offDuration = get16BitsComplement(-600 / factor); | |
var repeatDuration = get16BitsComplement(-25700 / factor); |
This file contains hidden or 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 tessel = require('tessel'); | |
var sony = require('./sony'); | |
var infraredlib = require('ir-attx4'); | |
var infrared = infraredlib.use(tessel.port['A']); | |
// When we're connected | |
infrared.on('ready', function() { | |
if (!err) { | |
console.log("Connected to IR!"); | |
// Start sending a signal every three seconds |