How can I use IR receiver on my pandaII

hello everyone

I bought a pair of IR receiver and remote control but I dont know how I can use it because I dont know what remote control send. I tried to read by LCD but I couldnt because I read different number on LCD even though I didnt push any button. if there is anyone who know about this, I will be pleasant

We need more info on your receiver.

Edit: my code was not meant to be used with your IR receiver :frowning: I thought you were speaking of FEZ IR receiver.

Sorry.

firstly thanks quick reply :clap:

I added photo of device and here is my code:

Cpu.Pin myPin = (Cpu.Pin)FEZ_Pin.Digital.Di0;
OneWire ow = new OneWire(myPin);

         byte message;
         while (true)
         {
             LCD.Clear();

             message = ow.ReadByte();
                LCD.Printf( message.ToString());
                Thread.Sleep(1000);
                 
             
          }

but even though I didnt push any button some number show up on the screen

Do you have datasheet or technical specification on the receiver?

but I have remote control so I cant change code it send. I need to know what it send. and I cant control because it is not regular

sorry I dont have. I asked and looked for on the net but I couldnt find anything

Mmm, why do you think it’s a onewire device??

because I can get data only serial… how can I do this else

serial is not onewire. Your code is trying to use onewire. Have you tried using serial?

no because I dont know how to use serial in c# could you help me?

I think I saw some arduno code on internet for that module. Check that.

but I dont know to use serial communication on c# I thought it is same onewire

nope, different.

look at the tutorials, there’s serial comms info there for sure…

in there all of them is about serialport. mine is not about this

Do you have an oscilloscope or logic analyser?

Check what that line looks like when you press different buttons.

Perhaps if you can put on the forum any info from the IR receiver device - like manufacturer and model number (any info on the board itself).

Using Onewire will not work if it’s a Serial Device. Using Serial will not work if it’s I2C. etc…

so which one must I use if I have IR receiver?

It depends on the board you have — each one is different.

So either use the information on the board and chip on the IR Receiver to lookup on the internet

… OR …

as Architect mentioned try to use an oscilloscope or logic analyser.

ok I solved my problem using serial communication thanks for everyone. if any one who has same problem code is here:

LCD.Initialize();
LCD.CursorHome();
SerialPort UART = new SerialPort(“COM1”, 300);
int read_count = 0;
byte[] rx_byte = new byte[1];

        UART.Open();
        while (true)
        {
            LCD.Clear();
            // read one byte
            read_count = UART.Read(rx_byte, 0, 1);
            if (read_count > 0)// do we have data?
            {
                // create a string
                string counter_string = rx_byte[0].ToString();
                LCD.Printf("mesaj="+counter_string+" ");

                Thread.Sleep(1000);
            }