From e91f09cd3f9704a7ccd6eee4314e1eb0e52f69ef Mon Sep 17 00:00:00 2001 From: UberGuidoZ <57457139+UberGuidoZ@users.noreply.github.com> Date: Mon, 23 May 2022 22:10:09 -0700 Subject: [PATCH] Add files via upload --- Infrared/ir_convert.js | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Infrared/ir_convert.js diff --git a/Infrared/ir_convert.js b/Infrared/ir_convert.js new file mode 100644 index 00000000..5f1fb685 --- /dev/null +++ b/Infrared/ir_convert.js @@ -0,0 +1,24 @@ +//usage: node irconvert.js +//steps from https://stackoverflow.com/a/27323452 +//sourced from https://gist.github.com/XMB5/a877ab620d812260f2da8380aac050d3 + +numbers=process.argv[2].split(' ').map(x=>parseInt(x,16)) +fullSequenceConverted=[] + +carrierFrequency = 1000000/(numbers[1] * .241246) +codeLength = numbers[2] +repeatCodeLength = numbers[3] + +for(i=4;i