ir #2012
Replies: 14 comments
-
Posted at 2016-12-18 by MattC This something I have done recently, check out the thread The code below should get you started, you need to set the raw timings in the times array, this is the time in milliseconds the IR led will pulse on and off for. The timings can be worked out from the hex codes or try this website to find your device http://irdb.tk/ Also if you want to convert hex to raw times this thread helped me http://www.remotecentral.com/cgi-bin/mboard/everything_else/thread.cgi?325 Also note that the in built IR doesn't have much range, maybe 50cm at most.
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-19 by @gfwilliams I did a video about this on friday too: http://www.espruino.com/Puck.js+Infrared If you can find the sequence of pulses needed for your TV online then yes, you really can just put the times in millisecond, separated by commas, into the @mattc that irdb website looks excellent. I can't seem to find and easy way on there to get the raw numbers, but that other post you found seems to explain it pretty well. I guess it should be pretty easy to make a little library that could take the pronto hex codes and send them directly? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-19 by MattC @gfwilliams on the irdb website once you pick your device there are tabs for Pronto Hex, Hex and Raw codes (which you probably saw) but for some reason not all codes on the site have raw times, my LG tv luckily had the raw times but for a sony TV they were blank so I had to calculate them from the pronto codes. There seems to be a few Arduino libraries which can send pronto hex codes, perhaps these could be converted for Espruino. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-19 by @gfwilliams Yeah, unfortunately the TVs I looked up (samsung + panasonic) didn't have the raw times in :( Yes, it should be pretty straightforward - it looks like even something as simple as |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-19 by zatan007 Thank you to both of you. I will try. Hope that I will understand it :). |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-19 by @gfwilliams Just post up if you have any questions. I haven't had a chance to try this out, but if you upload this function to the Puck:
Then you should be able to use 'Pronto Hex' codes. For instance for the LG power button. You could use the codes off of http://irdb.tk/find/ and could do:
Or you could just run this code in a browser window on your PC:
and it'll give you the numbers you need to put into |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-23 by @gfwilliams Just to add - if someone can confirm this works for them then I'll write it up and stick it on the main Espruino website. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-24 by MattC @gfwilliams I did a very quick test last night and couldn't get it to work with a pronto code, I was getting an error but I was using the WebBle app on an iPad which I've not used before. Will try a proper test when I get time. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-24 by @gfwilliams Ok, thanks! If you could post the error up it'd be handy. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-02-04 by MattC @gfwilliams finally got round to testing this properly and I can confirm it works great :) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-02-06 by @gfwilliams Great - thanks! |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-02-07 by @gfwilliams I've now added a module to handle this, and some explanation: http://www.espruino.com/pronto |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-02-08 by Wilberforce I see on the page there is UAI hex which is an even shorter string... does this encode the same info? Sorry this link I cut and paste does not work :-( |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-02-08 by @gfwilliams I have no idea - you'd have to Google it. If it does then a PR with a UAI decoder would be great :) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-18 by zatan007
Hello
I'm so new to this Puck Js. I just want to make first program just try to turn off TV or Air-Con.
Where should I start ?
Do I really need the IR receiver ? Or I can use hex code from the website and maybe there is a way to turn into values which can be used in Puck js.
Please advise me,
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions