-->
Page 2 of 4

Re: IR receiver with ESP8266 Arduino IDE

PostPosted: Mon Jun 01, 2015 1:24 pm
by Lstt
Ok, thank you for information, wait you next investigation..) I was find at thats author code on c++ https://github.com/sh4d0w12/esp8266_irlib - but i am nube on c++))

Re: IR receiver with ESP8266 Arduino IDE

PostPosted: Tue Jun 02, 2015 12:23 am
by Lstt
Yesterday i find another not standart solution, without iremote.h, wich include interrupt.h (run only AVR) - https://translate.google.com/translate? ... edit-text= .
But wheh i compile and load first sketch, esp8266 is reboot about 4-5 second for a while...

Re: IR receiver with ESP8266 Arduino IDE

PostPosted: Thu Jun 04, 2015 2:29 pm
by PaulDG
So, buried on page 2 of the comments of Ken Shirriff's blog post http://www.righto.com/2009/08/multi-protocol-infrared-remote-library.html?commentPage=2
is a comment from Suat Özgür
Here is a workaround to send() using any I/O pin and without using hardware PWM o

https://sui77.wordpress.com/2011/05/27/ ... -soft-pwm/


While his example libs were lost to the internet gods, I was able to use his examples to modify Ken's library to work with the esp8266.
I used an esp8266 01 to receive Ir codes over udp and transmit over Ir, I also used an esp8266 201 to receive Ir codes and send them over udp to the transmitter but I haven’t used a single 8266 for both receive and transmit.

I managed to get the transmitter working from his examples but the receiver was more difficult, I had to ditch his timing loop and go with a simple timer in the main loop. I ended up sampling at 41 micro seconds.
Code: Select allvoid loop() {
  if ( micros() - PointA > 41 ) {
    irrecv.pgti();
    PointA = micros();
  }
 
  if (irrecv.decode(&results)) {
    Serial.println(results.value);
    delay(800); // Stops Key Bounce
    irrecv.resume(); // Receive the next value
  }


PaulDG

Re: IR receiver with ESP8266 Arduino IDE

PostPosted: Sat Jun 06, 2015 2:12 pm
by Lstt
Thanks, wiil be probe!