A query: not sure why the first value is consistently missing (i.e. 9.0).
Am I in fact transmitting the inverse pattern or am I just not understanding the IR protocol? (The definition file was captured (transmitted from a physical remote) using the same Receiver code, i.e. (from you!)
function onInit() {
digitalWrite(D2, 0);
pinMode(D1, "input_pullup");
var d = [];
setWatch(function (e) {
d.push(1000 * (e.time - e.lastTime));
}, D1, {
edge: "both",
repeat: true
});
var lastLen = 0;
setInterval(function () {
if (d.length && d.length == lastLen) {
d.shift(); // remove first element
console.log(d.map(a => a.toFixed(1)).toString());
d = [];
}
lastLen = d.length;
}, 200);
setInterval(() => LED3.toggle(), 500);
}
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Your first line (D25,D26) produces result but not (D26,D26)!
I guess I will use D25,26 for transmission.
A query: not sure why the first value is consistently missing (i.e. 9.0).
Am I in fact transmitting the inverse pattern or am I just not understanding the IR protocol? (The definition file was captured (transmitted from a physical remote) using the same Receiver code, i.e. (from you!)