Skip to main content
Topic: How to get the raw-data in C++ or Java. (Read 824 times) previous topic - next topic

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.


 

Re: How to get the raw-data in C++ or Java.

Reply #2
Thanks for your kindness!!!
I will try your solution and reply!