1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-17 22:23:10 +03:00

Fixed robot libraries and examples for unified Arduino core

This commit is contained in:
Xun Yang
2013-08-21 23:04:42 +02:00
parent 293e46bfb4
commit ec31a2ee5c
34 changed files with 2984 additions and 243 deletions

View File

@ -0,0 +1,23 @@
#include "IRremote.h"
#include "IRremoteTools.h"
#include <Arduino.h>
int RECV_PIN = TKD2; // the pin the IR receiver is connected to
IRrecv irrecv(RECV_PIN); // an instance of the IR receiver object
decode_results results; // container for received IR codes
void beginIRremote(){
irrecv.enableIRIn(); // Start the receiver
}
bool IRrecived(){
return irrecv.decode(&results);
}
void resumeIRremote(){
irrecv.resume(); // resume receiver
}
unsigned long getIRresult(){
return results.value;
}