Skip to main content

Show Posts

This section allows you to view all Show Posts made by this member. Note that you can only see Show Posts made in areas you currently have access to.

Messages - raretomato

2
USB Infrared Toy / How to get the raw-data in C++ or Java.
I bought the IR-toy and It works well with WinLIRC.

Now, I want to use IR-toy for receiving some data. So It works differently than remote control.
(there are no pre-defined IR-code.)

Therefore, I want to get rawdata like SUMP logic analyzer.
Ex : {9000, 4500, 578, 552, 578, 552, 578, 1684, 578, 552, 578, 552, 578, 552, 578, 552, 578, 552, 578, 1684, 578, 1684};

I can get this data with Home-brew Serial port IR-receiver using below c++ code.

while(1){
   bool now = _serialPort->CDHolding;
   if(now!=pre){
      QueryPerformanceCounter(&liCounter2); 
      int interval = (int)((double)(liCounter2.QuadPart - liCounter1.QuadPart) / (double)liFrequency.QuadPart * 1000000);
      pre = now;
      QueryPerformanceCounter(&liCounter1);
   }
}

Please help me. Thanks.