Sending a signal with Adafruit super-bright 5mm ir led 940nm #3398
Replies: 8 comments
-
Posted at 2020-06-09 by furuskog I have planned to have it connected to homebridge and controll my fans, automatically turn on the fans when the room gets to hot. But also able to command it by Siri |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-06-10 by @gfwilliams Hi! What firmware is on your Puck.js, and which version Puck is it? This seems like something you should be able to do pretty easily and your code looks fine. Do you see anything appear on the second Puck if you paste in Using an external IR LED should be fine though... You'll just have to specify the pins with Or, the code that's in your HTML:
Should work fine too - you just have to change A5/A6 for D30/D31. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-06-10 by furuskog Hi, thank you @gfwilliams, I’m using 2.05 firmware and My puck was bought several years ago so I guess it’s the first version? didn’t know there was a new one |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-06-10 by @gfwilliams Ahh, right. Sorry, I think you fell foul of a bug I introduced while trying to support Puck.js v2 with the same firmware: https://github.com/espruino/Espruino/blob/master/ChangeLog#L11
So I think if you add I'm planning to release a version 2v06 very soon which should have that (and a few other) fixes in though. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-06-10 by furuskog Thanks @gfwilliams, that is what I like to call good customer service! |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-06-10 by furuskog @gfwilliams Hmm it kind of works, but I need to be 10cm from it. The d30/d31 does not work. I have the short one in the d31. Do I need a resistor? Any ideas? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-06-10 by furuskog @gfwilliams got it to work. With the externa led My leads didn’t touch the metal. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-06-11 by @gfwilliams Glad it's going ok! With 2v05 and later you might have some success increasing range of the external LED by just specifying a single IO pin and connecting the other pin of the LED to GND. The on-puck LED should do better than 10cm though - it is reasonably directional without the cover though, so it helps if it's pointing towards the thing you're interested in controlling. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-06-09 by furuskog
Hello im trying to send a signal from my puckjs with an external ir led to a remote controlled fan. I tried the tutorial with capturing data from the remote control and got some values to my ir receiver . I tried the ordinary built in IR but it did not work i tried to capture the signal with another puck but it sends no signal. I have attached my code. What pins should i use for the ir led? i have used d30 and d31.
Any ideas?
Attachments:
Beta Was this translation helpful? Give feedback.
All reactions