Unable to lean remote codes

This is the JP1 beginners forum. There's no such thing as a stupid question in here, so post away, but this forum is just for JP1 users and people considering JP1, non-JP1 users please use the appropriate forum above!

Moderator: Moderators

Bob8K
Posts: 28
Joined: Sat Feb 13, 2016 12:13 pm

Post by Bob8K »

Thanks Rob, but with your help and all my readings since I started this thread, I did get all of this!

I did try at first blindly stuff like "000B 0001" which of course did not work, but the last tries have been "0000 000B", or even "000B 000B" while duplicating the data, and changing the Lead In and/or Lead Out of only one of the two data sets.

Unfortunately, the MX is stubborn: as with every other remote it already learned, the USB Toy and IrScrutinizer showed that it always send 2 pulses when the repeat is set.

Next I'll be trying to use an Arduino to relay the MX IR pulses, and make it skip the second pulse. Not sure it will be able to do that fast enough though.
Robert
The Robman
Site Owner
Posts: 22057
Joined: Fri Aug 01, 2003 9:37 am
Location: Chicago, IL
Contact:

Post by The Robman »

Like Barf mentioned earlier, even though we are experts on remote signals, we don't know much about the MX- line of remotes. Have you tried asking about this over at Remote Central? If you do, link back to this thread so they can see what we've covered already, and post a link to the RC thread here, so we can see any progress.
Rob
www.hifi-remote.com
Please don't PM me with remote questions, post them in the forums so all the experts can help!
Bob8K
Posts: 28
Joined: Sat Feb 13, 2016 12:13 pm

Post by Bob8K »

The Robman wrote:Like Barf mentioned earlier, even though we are experts on remote signals, we don't know much about the MX- line of remotes. Have you tried asking about this over at Remote Central? If you do, link back to this thread so they can see what we've covered already, and post a link to the RC thread here, so we can see any progress.
Good idea, I'll try.
Robert
Bob8K
Posts: 28
Joined: Sat Feb 13, 2016 12:13 pm

Post by Bob8K »

Barf,

Until I get a response from Remote Central (I doubt there will be a solution though), I'm going to toy with my Arduino as an IR relayer to clean up the pulses.

Would you recommend that I use AGirs, AGirs Lite or Infrared4Arduino?

I have been using IRLib so far, but without much success as we already saw.
Robert
Bob8K
Posts: 28
Joined: Sat Feb 13, 2016 12:13 pm

Post by Bob8K »

The Robman wrote:Like Barf mentioned earlier, even though we are experts on remote signals, we don't know much about the MX- line of remotes. Have you tried asking about this over at Remote Central? If you do, link back to this thread so they can see what we've covered already, and post a link to the RC thread here, so we can see any progress.
Here:
http://www.remotecentral.com/cgi-bin/mb ... .cgi?11953
Robert
Barf
Expert
Posts: 1536
Joined: Fri Oct 24, 2008 1:54 pm
Location: Munich, Germany
Contact:

Post by Barf »

Bob8K wrote:... I'm going to toy with my Arduino as an IR relayer to clean up the pulses.

Would you recommend that I use AGirs, AGirs Lite or Infrared4Arduino?
I am not sure if I would recommend a translator as a means for solving your problems, but anyhow:

Infrared4Arduino is a "low level" library, like IRlib and IRremote. AGirs is a very powerful, flexible, and configurable server for the Arduino. GirsLite is, as the name suggests, basically a small (but not minimal!) configuration optimized for IrScrutinizer, Lirc, and a hardware configuration as here.

Have a look at Rc5Renderer,ino on how to send Rc5 signals with Infrared44Arduino. Then look at Opponator, which should give you an idea on how to make a translator.
Bob8K
Posts: 28
Joined: Sat Feb 13, 2016 12:13 pm

Post by Bob8K »

Barf wrote:
Bob8K wrote:... I'm going to toy with my Arduino as an IR relayer to clean up the pulses.

Would you recommend that I use AGirs, AGirs Lite or Infrared4Arduino?
I am not sure if I would recommend a translator as a means for solving your problems, but anyhow:

Infrared4Arduino is a "low level" library, like IRlib and IRremote. AGirs is a very powerful, flexible, and configurable server for the Arduino. GirsLite is, as the name suggests, basically a small (but not minimal!) configuration optimized for IrScrutinizer, Lirc, and a hardware configuration as here.

Have a look at Rc5Renderer,ino on how to send Rc5 signals with Infrared44Arduino.
I tried this:

Code: Select all

#include <Rc5Renderer.h>
#include <IrSenderPwm.h>

IrRenderer *renderer;

void setup() {
    renderer = new Rc5Renderer(0, 1);
}

void loop() {
    renderer->send(*IrSenderPwm::getInstance(true));
    delay(1000);
    renderer->send(*IrSenderPwm::getInstance(true));
    delay(10000);
}
and got:

Code: Select all

Compiling debug version of 'Test_IR' for 'Arduino/Genuino Uno'
Test_IR.ino:15:1: error: 'IrRenderer' does not name a type
I did install (username "m1"):

Code: Select all

C:\Users\m1\Documents\Arduino\libraries\Infrared4Arduino-master
So I'm not sure what I'm doing wrong.

This one:

Code: Select all

#include <IrSenderPwm.h>
#include <Pronto.h>
 
IrSignal *irSignal;
 
void setup() {
    irSignal = Pronto::parse("0000 006F 0000 000C 001F 0020 0020 0020 0020 0020 0020 0020 0040 0020 0020 0020 0020 0020 0020 0040 0020 0020 0040 0040 0020 0020 0020 0CA8");
}
 
void loop() {
    IrSenderPwm::getInstance(true)->sendIrSignal(*irSignal);
    delay(100);
}
compiled fine (although the example was wrongly using sendSignal instead of sendIrSignal), but that actually works poorly, even though the sequence above is one that works now with the MX. So, the library **appears** to be correctly installed.

Then look at Opponator, which should give you an idea on how to make a translator.
I already wrote an IR to RS232 translator, that works pretty well. But the G RS232 commands are very limited, so I need some native IR in addition.

I used IRLib, so this one will be very useful to show me how to use AGirs, thanks.
Robert
Barf
Expert
Posts: 1536
Joined: Fri Oct 24, 2008 1:54 pm
Location: Munich, Germany
Contact:

Post by Barf »

Bob8K wrote: I tried this:

Code: Select all

#include <Rc5Renderer.h>
#include <IrSenderPwm.h>

IrRenderer *renderer;

void setup() {
    renderer = new Rc5Renderer(0, 1);
}

void loop() {
    renderer->send(*IrSenderPwm::getInstance(true));
    delay(1000);
    renderer->send(*IrSenderPwm::getInstance(true));
    delay(10000);
}
and got:

Code: Select all

Compiling debug version of 'Test_IR' for 'Arduino/Genuino Uno'
Test_IR.ino:15:1: error: 'IrRenderer' does not name a type
Essentially copied from Rc5Renderer.ino, right. Ooops, I really forgot to update that. :oops: However, this works:

Code: Select all

// Sends Rc5 0/1 twice with different toggle values.
// Turns e.g. a Philips TV to channel 11.

#include <Rc5Renderer.h>
#include <IrSenderPwm.h>

IrSender *sender;

void setup() {
    sender = IrSenderPwm::getInstance(true);
}

void loop() {
    const IrSignal *signal = Rc5Renderer::newIrSignal(0, 1);
    sender->sendIrSignal(*signal);
    delay(1000);
    signal = Rc5Renderer::newIrSignal(0, 1);
    sender->sendIrSignal(*signal);
    delay(10000);
}
Then look at Opponator, which should give you an idea on how to make a translator.
I already wrote an IR to RS232 translator, that works pretty well. But the G RS232 commands are very limited, so I need some native IR in addition.
I meant it as an example, to change the serial sending commands to appropriate IR sending commans, for example as above.
Bob8K
Posts: 28
Joined: Sat Feb 13, 2016 12:13 pm

Post by Bob8K »

Barf wrote: Essentially copied from Rc5Renderer.ino, right. Ooops, I really forgot to update that. :oops: However, this works:

Code: Select all

// Sends Rc5 0/1 twice with different toggle values.
// Turns e.g. a Philips TV to channel 11.

#include <Rc5Renderer.h>
#include <IrSenderPwm.h>

IrSender *sender;

void setup() {
    sender = IrSenderPwm::getInstance(true);
}

void loop() {
    const IrSignal *signal = Rc5Renderer::newIrSignal(0, 1);
    sender->sendIrSignal(*signal);
    delay(1000);
    signal = Rc5Renderer::newIrSignal(0, 1);
    sender->sendIrSignal(*signal);
    delay(10000);
}
Yes it does, thanks.

The result are erratic though, the Goldmund is definitively an odd RC 5 duck.

However, I was wrong about the Pronto::parse method not working: I forgot that my gizmo needs to be plugged in the mains to actually send an IR signal, the IR Led not being connected to the USB derived 5V supply. Duh!

This works correctly, although not as well as the original remote. Well enough to do what I need I think.
I meant it as an example, to change the serial sending commands to appropriate IR sending commans, for example as above.
That will be very useful to convert my current sketch to your library. I know how to send now, I'll look into it to see how to receive.

Thanks!
Robert
Post Reply