Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * IRremoteESP8266: IRsendDemo - demonstrates sending IR codes with IRsend
- * An IR LED must be connected to ESP8266 pin 0.
- * Version 0.1 June, 2015
- * Based on Ken Shirriff's IrsendDemo Version 0.1 July, 2009, Copyright 2009 Ken Shirriff, http://arcfn.com
- */
- #include <IRremoteESP8266.h>
- IRsend irsend(0); //an IR led is connected to GPIO pin 0
- void setup()
- {
- irsend.begin();
- Serial.begin(9600);
- }
- void loop() {
- Serial.println("On");
- irsend.sendNEC(0x00FFE01F, 36);
- delay(2000);
- Serial.println("Off");
- irsend.sendNEC(0x00FF609F, 36);
- delay(2000);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement