Skip to content

Instantly share code, notes, and snippets.

@nckltcha
Created February 4, 2016 16:22
Show Gist options
  • Select an option

  • Save nckltcha/93229515bbc0221f2f67 to your computer and use it in GitHub Desktop.

Select an option

Save nckltcha/93229515bbc0221f2f67 to your computer and use it in GitHub Desktop.
/*
* 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(4); //an IR led is connected to GPIO pin 0
void setup()
{
irsend.begin();
Serial.begin(9600);
}
void loop() {
Serial.println("NEC");
irsend.sendNEC(0x00FFE01F, 36);
delay(2000);
Serial.println("Sony");
irsend.sendSony(0xa90, 12);
delay(2000);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment