Google-Apps
Hauptmenü

Post a Comment On: Ken Shirriff's blog

"64-bit RC6 codes, Arduino, and Xbox remotes"

23 Comments -

1 – 23 of 23
Anonymous Carl said...

This works perfectly with an Xbox 360 Ken. Much better than sending a huge Raw code. Thanks for your work.

Do you know a way of converting a char array to long long with the arduino for use with this? It doesn't seem to support atoll(), or strtoll().

December 4, 2010 at 4:41 AM

Blogger cruzinthegalaxie said...

I am testing your IRrecvDump example with a Fisher Price GeoTrax ir remote and was wondering if you had any tutorials/examples of how to record and playback the codes?

The library seams to work very well and the remote is fairly consistent in that it hops between codes, but seems to send quite a bit of unnecessary data to control Fwd/Stop/Rev actions on a train. Granted the trains are (in theory) using unique start codes per model - but not between to trains of the same model (proved this with a duplicate train.)

This is a FWD code on the GeoTrax Blue Poney Express below. The first 32 bits hops between 4 codes on repeated stop/start, then there is a filler code 7EA326B3 repeated 10-20 times.

Another night I'll set up the emitter and try sending some test codes at it to see if I can get the train to respond.

Thanks
-Alex

Unknown encoding: 75FCE4C7 (32 bits)

Raw (42): -13568 2650 -200 600 -150 550 -550 600 -150 850 -650 800 -300 550 -1250 2650 -200 600 -150 550 -550 600 -150 850 -650 800 -300 550 -1000 2700 -200 550 -200 550 -550 550 -200 800 -650 850 -250 550

Unknown encoding: FFFFFFFFD28120C8 (32 bits)

Raw (14): -6678 2650 -200 600 -150 550 -550 600 -150 850 -650 800 -300 550

Unknown encoding: 7EA326B3 (32 bits)

Raw (14): -6628 2650 -250 550 -200 550 -550 550 -150 850 -650 800 -300 550

Unknown encoding: FFFFFFFFD28120C8 (32 bits)

Raw (14): -6628 2650 -200 600 -150 550 -550 600 -150 850 -650 800 -300 550

Unknown encoding: 7EA326B3 (32 bits)

Raw (14): 10130 2700 -200 550 -200 550 -550 550 -200 800 -650 850 -250 600

Unknown encoding: 7EA326B3 (32 bits)

Raw (14): 10430 2700 -200 550 -200 550 -550 600 -150 800 -650 850 -250 600

Unknown encoding: 7EA326B3 (32 bits)

Raw (14): 10430 2700 -200 550 -200 550 -550 550 -200 800 -650 850 -250 550

Unknown encoding: FFFFFFFFD28120C8 (32 bits)

Raw (14): 10130 2650 -200 600 -150 550 -550 600 -150 850 -650 800 -300 550

Unknown encoding: 7EA326B3 (32 bits)

Raw (14): 10380 2650 -200 550 -200 550 -550 550 -200 850 -600 850 -300 550

Unknown encoding: 7EA326B3 (32 bits)

Raw (14): 10380 2650 -200 550 -200 550 -550 600 -150 800 -650 850 -250 600

Unknown encoding: FFFFFFFFD28120C8 (32 bits)

Raw (14): 10180 2650 -250 550 -150 600 -550 550 -150 850 -650 800 -300 550

Unknown encoding: 7EA326B3 (32 bits)

Raw (14): 7480 2700 -200 550 -200 550 -550 550 -200 800 -650 850 -250 600

Unknown encoding: 7EA326B3 (32 bits)

Raw (14): 5630 2650 -250 550 -200 550 -550 550 -200 800 -650 800 -300 550

Unknown encoding: 7EA326B3 (32 bits)

Raw (14): 5830 2650 -250 550 -200 550 -550 550 -200 800 -650 850 -250 550

Unknown encoding: 7EA326B3 (32 bits)

Raw (14): 5830 2700 -200 550 -200 550 -550 550 -200 800 -650 850 -250 600

Unknown encoding: 7EA326B3 (32 bits)

Raw (14): 5630 2650 -250 550 -200 550 -550 550 -200 800 -650 800 -300 550

Unknown encoding: 7EA326B3 (32 bits)

Raw (14): 5830 2700 -200 550 -200 550 -550 550 -200 800 -650 850 -250 550

Unknown encoding: 7EA326B3 (32 bits)

Raw (14): 5830 2700 -200 550 -200 550 -550 550 -200 800 -650 850 -250 600

Unknown encoding: 7EA326B3 (32 bits)

Raw (14): 5630 2650 -250 550 -200 550 -550 550 -200 800 -650 850 -250 550

Unknown encoding: 7EA326B3 (32 bits)

Raw (14): 5780 2650 -250 550 -200 550 -550 550 -200 800 -650 800 -300 550

Unknown encoding: 7EA326B3 (32 bits)

Raw (14): 5580 2700 -200 550 -200 550 -550 550 -200 800 -650 850 -250 600

Unknown encoding: 7EA326B3 (32 bits)

Raw (14): 5830 2700 -200 550 -200 550 -550 550 -200 800 -650 850 -250 550

Unknown encoding: 7EA326B3 (32 bits)

Raw (14): 5780 2650 -250 550 -200 550 -550 550 -200 800 -650 850 -250 550

Unknown encoding: 7EA326B3 (32 bits)

Raw (14): 5530 2650 -200 550 -200 550 -550 550 -200 850 -600 850 -300 550

January 15, 2011 at 7:34 PM

Anonymous Anonymous said...

Yep it works. Your the best!

November 4, 2011 at 4:34 PM

Anonymous Anonymous said...

There are multiple places where variables have been defined as "unsigned long long".
Once I changed these to "unsigned long" they compile and work correctly.

Thanks for all the great work, Ken.


JoeO

November 5, 2011 at 8:05 AM

Anonymous Anonymous said...

I picked up the new libraries because they have additional functions.. I did not read the article fully. Now I get it........

JoeO

November 5, 2011 at 11:07 AM

Blogger GeneRalf said...

Hi guys,

I am using a ArduinoMega2560 and need all 12 PWM Outputs. However to control the Arduino Mega2560 it wouldbe nice to use the IRLib. It looks everything is working fine but 2 Outputs ( PWM 9 and 10) are not working anymore.
Is this because the Lib is usingthe same timer like the analogWrite ? Or are these differet timers ?

November 9, 2011 at 8:28 AM

Blogger CodyW said...

When I attempt to compile your code under the Receiving an Xbox code section I get an error..

error: call of overloaded 'println(long long unsigned int, int)' is ambiguous

its because of this line:
Serial.println(results.value >> 32, HEX);

And I have not been able to figure out why its doing this, even after a lengthy search across the web for some insight. Any help would be appreciated.

January 9, 2012 at 10:16 PM

Blogger Alex323qp said...

It doesn't seem to work with the latest version of Xbox 360 with kinetic :(.

January 20, 2012 at 8:08 PM

Comment deleted

This comment has been removed by the author.

February 1, 2012 at 1:39 AM

Anonymous dougBTV said...

Just wanted to post and say that this worked very well for me! I needed 36 bit RC6 codes to emulate a MCEUSB remote with an IR LED attached to an arduino rig, and I've had very good success. I wanted to do this so that I could have a linux box running LIRC (the linux ir remote control daemon) that I could then listen to instructions from an Arduino if it had line-of-sight between the two (with a USB IR receiver on the linux box)

I do want to say that I couldn't get enough juice out of the arduino proper, so I had to power the LED through an transistor, like you'd power any high powered LED. I learned the hard way. I had grabbed raw codes first, then... Experimented and saw that the usb IR receiver was a lot happier when I did this.

Also, I wrote some PHP code that you can use to convert LIRC hex codes to the Arduino IR library hex codes. You can find the code on pastebin here: http://pastebin.com/wadbXRK2

Thanks for making this awesome IR library, made life pretty easy!

April 12, 2012 at 10:52 AM

Anonymous Garry said...

hey Ken, great work

is it possible to use the RC6 library, (either this one or your older version) to control a Sky satellite box using these codes:

http://lirc.sourceforge.net/remotes/sky/SKY+_DVB-S

I have the arduino controlling my panasonic TV using the library Lauszus created, but I can't get the RC6 to work??

May 16, 2012 at 9:13 AM

Blogger Greg said...

Yes it is possible - thanks to Ken's library I made an instruct able doing exactly that: http://www.instructables.com/id/Arduino-browser-based-remote-control-linux/

May 16, 2012 at 4:05 PM

Anonymous Garry said...

Thanks Greg, i'll check that out

May 17, 2012 at 4:15 AM

Anonymous Garry said...

Hey Greg,

I'm really new to this, but I was wondering do you have an example of what you would put into Ken's library to, for example, turn the Sky box on/off. Looking through your code, it seems

irsend.sendRC6(0xC05C0C,24);

should work, at least one anyway, as i'm not worrying about the toggle bit just yet

May 17, 2012 at 10:25 AM

Anonymous Garry said...

Hey Greg,

Never mind, I was trying to control an older version of sky box, but the the plus codes don't work for it. the HD box is working great though, so i'm back on track.

thanks for your codes, saved me some work.

always the silly things :)

May 18, 2012 at 4:18 AM

Anonymous Emanuele said...

Hi, I tried the new library, but the remote control of Grundig and SKY are not supported and does not work either sendRaw, how can I do?
thanks

May 21, 2012 at 1:34 PM

Blogger vsnine said...

Just a quick note, for my setup with RAW codes, bumping the serial speed up to 57600bps seemed to make it work (at all). I did not try any other speeds.

Otherwise the library works great.

June 10, 2012 at 10:20 PM

Blogger Ethan said...

I'm building an arduino-based remote control for my Elco air conditioner. I found your original code, and then this version, which works great with the very long signal air-conditioners use.
I successfully reverse-engineered the code Elco uses, and created methods for decoding and sending them.
Will contribute to your codebase once I'm done with this project.

August 25, 2012 at 2:43 PM

Anonymous Anonymous said...

Hi Garry,

I changed the middle two hex digits in Greg's hex codes from 5C to 01 (e.g. C05C0C to C0010C for power) it worked for my old sky plus box.

Also my thanks to Ken and Greg for their generosity.

I hope this helps, Trad

June 1, 2013 at 2:26 PM

Blogger Greg said...

Hi Trad
Glad my code steered you in the right direction, and that people are still tinkering with Ken's code :)
Best regards
Greg

June 1, 2013 at 2:46 PM

Anonymous Anonymous said...

For those working with RC6 on the Micro/Leonardo below is a patch that will fix build.

diff --git a/IRremoteInt.h b/IRremoteInt.h
index 751a888..4976881 100644
--- a/IRremoteInt.h
+++ b/IRremoteInt.h
@@ -14,7 +14,11 @@
#ifndef IRremoteint_h
#define IRremoteint_h

-#include
+#if defined(ARDUINO) && ARDUINO >= 100
+ #include "Arduino.h"
+#else
+ #include "WProgram.h"
+#endif

// define which timer to use
//
@@ -306,6 +310,8 @@ extern volatile irparams_t irparams;
})
#if defined(CORE_OC4A_PIN)
#define TIMER_PWM_PIN CORE_OC4A_PIN /* Teensy */
+#elif defined(__AVR_ATmega32U4__)
+#define TIMER_PWM_PIN 13 /* Leonardo */
#else
#error "Please add OC4A pin number here\n"
#endif

October 1, 2013 at 2:08 PM

Blogger Atnoz said...

Hi Mr. Shirriff, i used your IRrecvdump example and got this data from the power button of my remote control:
8054270C
Decoded RC6: 8054270C (36 bits)
Raw (62): -2614 2750 -800 500 -350 500 -400 500 -800 500 -800 1400 -800 500 -400 500 -400 500 -350 500 -400 500 -400 500 -350 550 -350 950 -800 950 -850 900 -850 500 -400 500 -350 500 -400 950 -800 500 -400 950 -350 500 -400 500 -800 500 -400 500 -400 500 -350 950 -400 500 -800 500 -400 500

How to format this serial output to feed the IRrecord from winlirc/lirc and auto/easily generate a config file for my remote?

These are my first steps in IR world and im feeling very dumb after read about all this pulses and timmings stuffs.

Thanks in advance.
Martha

May 4, 2014 at 9:36 AM

Anonymous Anonymous said...

Hi Ken,

I wanted to thank you for creating this library, it has been very helpful for my project! However, I had one question that I was hoping you could answer.

I am able to successfully receive an IR signal to and send an output to light a LED using an Arduino Uno using your library. However, when I attempt to use the same code with an ATTiny85, it does not work anymore. Are there any discrepancies between an Arduino Uno and ATTiny85 that affect using this library for the latter? I hope you can answer my question.

If you are unclear on anything I said, or need more info, feel free to let me know. Thank you again!

Best,
Andre

January 22, 2016 at 12:13 AM

You can use some HTML tags, such as <b>, <i>, <a>

Comment moderation has been enabled. All comments must be approved by the blog author.

You will be asked to sign in after submitting your comment.
Please prove you're not a robot