Ejemplo n.º 1
0
 public static void Main()
 {
     using (var receiver = new IRReceiver(Stm32F4Discovery.FreePins.PB5))
     {
         receiver.Pulse += ConsumePulse;
         Thread.Sleep(Timeout.Infinite);
     }
 }
Ejemplo n.º 2
0
 public static void Main()
 {
     using(var receiver = new IRReceiver(Stm32F4Discovery.FreePins.PB5))
     {
         receiver.Pulse += ConsumePulse;
         Thread.Sleep(Timeout.Infinite);
     }
 }
Ejemplo n.º 3
0
        public static void Main()
        {
            using(var receiver = new IRReceiver(Stm32F4Discovery.FreePins.PB5))
            {
                var detector = new RC5Decoder(receiver);
                detector.Frame += (s, f) =>
                                      {
                                          DateTime now = DateTime.Now;
                                          if (now < _nextCommand)
                                              return;

                                          Debug.Print("Addr:" + f.Address +
                                                      " Cmd:" + f.Command +
                                                      " Toggle: " + f.Toggle);

                                          _nextCommand = now.AddMilliseconds(500);
                                      };

                Thread.Sleep(Timeout.Infinite);
            }
        }
Ejemplo n.º 4
0
        public static void Main()
        {
            using (var receiver = new IRReceiver(Stm32F4Discovery.FreePins.PB5))
            {
                var detector = new RC5Decoder(receiver);
                detector.Frame += (s, f) =>
                {
                    DateTime now = DateTime.Now;
                    if (now < _nextCommand)
                    {
                        return;
                    }

                    Debug.Print("Addr:" + f.Address +
                                " Cmd:" + f.Command +
                                " Toggle: " + f.Toggle);

                    _nextCommand = now.AddMilliseconds(500);
                };

                Thread.Sleep(Timeout.Infinite);
            }
        }
Ejemplo n.º 5
0
 public RC5Decoder(IRReceiver receiver)
 {
     _receiver        = receiver;
     _receiver.Pulse += ConsumePulse;
 }
Ejemplo n.º 6
0
 public RC5Decoder(IRReceiver receiver)
 {
     _receiver = receiver;
     _receiver.Pulse += ConsumePulse;
 }