Then I changed the code around so that I could manipulate a TV.
With this code I was able to put the volume up/down change the channels up/down and turn it on/off:
#include <IRremote.h>
IRsend irsend;
void setup()
{
Serial.begin(9600);
}
void loop() {
char readvalue = Serial.read();
if (readvalue == 'q')
irsend.sendNEC(0x20DF40BF, 32);
else if (readvalue == 'w')
irsend.sendNEC(0x20DFC03F, 32);
else if (readvalue == 'l')
irsend.sendNEC(0x20DF10EF, 32);
else if (readvalue == 'e')
irsend.sendNEC(0x20DF00FF, 32);
else if (readvalue == 'r')
irsend.sendNEC(0x20DF807F, 32);
}
No comments:
Post a Comment