Re: IR receiver with ESP8266 Arduino IDE
Posted: Thu Jun 25, 2015 3:35 pm
PaulDG, would you be willing to upload your code to GitHub? Thanks!
-->
Open Community Forum for ESP8266, Come share Arduino and IoT (Internet of Things)
https://www.esp8266.com/
PaulDG wrote: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