Using IR Remote Con...
 
Notifications
Clear all

Using IR Remote Controls with the Arduino

27 Posts
6 Users
2 Likes
3,664 Views
(@alain)
Member
Joined: 3 years ago
Posts: 3
 

@codecage

 

No, I didn't.

For now, I'm happy as a child that the code works and I can't wait to proceed with Bill's tutorial.

However, In a couple of days I may do what you suggest. If so, I will post the results.


   
ReplyQuote
codecage
(@codecage)
Member Admin
Joined: 5 years ago
Posts: 1037
 

@alain

Good deal!   And Welcome to the Forum.  Looks like I may have been the cause of your confusion in getting onto the forum, but guess that is behind us now.

Have fun!

😎

SteveG


   
ReplyQuote
(@sbones5)
Member
Joined: 3 years ago
Posts: 5
 

I have this same problem. I tried rolling back the library and I'm not sure I'm doing it right because the version doesn't look like it's changing in Arduino ADE, but regardless, I'm getting nothing but "zeros" with no date stamp. 

My code:

/*
IR Receiver Demonstration 1
IR-Rcv-Demo1.ino
Demonstrates IR codes with IR Receiver
Displays results on Serial Monitor

DroneBot Workshop 2017
http://dronebotworkshop.com
*/

// Include IR Remote Library by Ken Shirriff
#include <IRremote.h>

// Define sensor pin
const int RECV_PIN = 4;

// Define IR Receiver and Results Objects
IRrecv irrecv(RECV_PIN);
decode_results results;

void setup(){
// Serial Monitor @ 9600 baud
Serial.begin(9600);
// Enable the IR Receiver
irrecv.enableIRIn();
}

void loop(){
if (irrecv.decode(&results)){
// Print Code in HEX
Serial.println(results.value, HEX);
irrecv.resume();
}
}

Any help is appreciated!

Thanks!


   
ReplyQuote
codecage
(@codecage)
Member Admin
Joined: 5 years ago
Posts: 1037
 

@sbones5

What version of the library is showing as "INSTALLED" in your Library Manager for the IRremote library by shirriff?

To get the demo in Bill's video working I think we had to go back to version 2.0.1.

SteveG


   
ReplyQuote
(@sbones5)
Member
Joined: 3 years ago
Posts: 5
 

It's showing 3.2.0. So I guess maybe I'm not changing it correctly. Or there is an error preventing me from changing it. I select "install" on a previous version in the Library Manager windows but it dosen't change the version it says is installed. 


   
ReplyQuote
codecage
(@codecage)
Member Admin
Joined: 5 years ago
Posts: 1037
 

@sbones5

In the lower left corner of the window in the Library Manager where you can see the installed version of IRremote, use the dropdown arrow to expose the different versions available.  Scroll down to the 2.0.1, select it and then click on install.  See attached pic:

LibManager1

Notice that I currently have 3.0.1 installed, but this is the procedure I used to go back to the 2.0.1 version when testing the previous issue that @groove was originally having getting his IR remote to work.

I have not investigated or figured out what changes to the sketch are needed to work with the current version of the library.  If anyone has please let us know the necessary changes.

SteveG


   
ReplyQuote
(@sbones5)
Member
Joined: 3 years ago
Posts: 5
 

@codecage

Hi that's exactly what I did but regardless, if I open it again it will show 3.2.0.

Anyway, it's not working as it's intended so I hope someone knows anything I can try next.

 

Thanks


   
ReplyQuote
codecage
(@codecage)
Member Admin
Joined: 5 years ago
Posts: 1037
 

@sbones5

OK, I'm stumped.  All I can say is "it worked for me!"  Anyone else have any thoughts?

SteveG


   
ReplyQuote
robotBuilder
(@robotbuilder)
Member
Joined: 5 years ago
Posts: 2042
 

@sbones5

If there is an innate problem with something new usually others would have the same issue?
Last time I used an IR remote control it worked ok with the library available at the time.

https://github.com/Arduino-IRremote/Arduino-IRremote

 


   
ReplyQuote
(@sbones5)
Member
Joined: 3 years ago
Posts: 5
 

One thing that came to mind was that I am over seas and using weird brand remotes from electronic companies I've never heard of. Such as EDID and IREINS.

So Maybe these devices simply don't exist in even the latest (3.2.0) library codes. 

This thought came to me before I just forgot to mention it. I did try to use a Samsung TV remote and got the same issue so I'm just not sure. 

The reason I want to do this, besides just learning how circuits work, is to be able to reprogram my remote and hopefully make a universal remote from the generic ones I already have. I mostly want to replace a remote I lost from a HDMI switch that has a very simple IR receiver in it. 

I am hoping that there is a hack or work around this library thing where you can simple copy the codes from the read out side or even the (somehow) the receiver and copy the signal out put to reproduce the signal in code for the new IR remote. 


   
ReplyQuote
(@sbones5)
Member
Joined: 3 years ago
Posts: 5
 

Does anyone know if there is a generic code that could capture all frequencies from a transmitter or send a master code to all receivers?

This post was modified 3 years ago by sbones5

   
ReplyQuote
robotBuilder
(@robotbuilder)
Member
Joined: 5 years ago
Posts: 2042
 

@sbones5

You could write a program to record how long the signal is on and how long it is off and then look for the patterns. You can save the sent command as raw data in an array. How long the signal was high followed by how long the signal was low until you start to see a repeat command then you know that is your data to be saved.  Maybe this can be seen on an oscilloscope?

 


   
sbones5 reacted
ReplyQuote
Page 2 / 2