Getting data based on existing IR HEX codes

Supporting Visual Studio on Windows
TheSensor

Getting data based on existing IR HEX codes

Postby TheSensor » Sat May 28, 2011 5:48 pm

I have a Phidgets IR transmitter and I downloaded the default sample for it, where an Apple remote Volume Up command is shows as a demo.

Code: Select all

//example of sending RAW Data - this was captured from an Apple remote Volume UP command
int[] data = {
   9040,   4590,    540,    630,    550,   1740,    550,   1750,    550,   1740,
    550,    620,    550,   1750,    550,   1740,    550,   1750,    550,   1740,
    550,   1740,    560,   1740,    540,    630,    550,    620,    550,    620,
    540,    630,    550,   1750,    550,   1740,    560,   1740,    550,    620,
    550,   1740,    550,    620,    550,    620,    560,    610,    550,    620,
    550,   1750,    550,   1740,    550,    620,    550,   1740,    550,   1750,
    550,    620,    550,    620,    550,    620,    540};


The gap is set to 108729. I was curious - how is it possible to get all this data from existing HEX codes (like it is shown here)?

User avatar
Patrick
Lead Developer
Posts: 3078
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: Getting data based on existing IR HEX codes

Postby Patrick » Mon May 30, 2011 9:53 am

They explain how they are coding the data here: http://www.remotecentral.com/features/irdisp2.htm

Essentially, their numbers are based on 'number of carrier frequency periods', whereas our raw data is based in microseconds. So you just have to choose a carrier frequency (it looks like they are using 40kHz), and convert the hex values to microseconds.

-Patrick


Return to “C#.NET”

Who is online

Users browsing this forum: No registered users and 1 guest