Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<IRremote.h>
- int recv_pin = 3;
- IRrecv receiver(recv_pin);
- decode_results results;
- void setup()
- {
- // put your setup code here, to run once:
- Serial.begin(9600);
- receiver.enableIRIn();
- }
- void loop()
- {
- // put your main code here, to run repeatedly:
- if (receiver.decode(&results)) // ******** added &results (a place to store the key code)
- {
- Serial.println(results.value, HEX);
- receiver.resume();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement