#include <IRremote.h> IRsend irsend; const int buttonPin = 4; int buttonState = 0; void setup() { pinMode(buttonPin, INPUT); Serial.begin(9600); } void loop() { buttonState = digitalRead(buttonPin); if(buttonState == HIGH){ irsend.sendNEC(0x80BFA15E, 32); } }