Advertisement
RuiViana

IR_AR_Send

Jan 10th, 2017
256
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.58 KB | None | 0 0
  1.  
  2. //B24DBF40   B24D7B84
  3. // Meu F4BA2988  liga/Desliga  CE3693E6  Source
  4.  
  5. #include <IRremote.h>
  6. long IRcode;
  7. int numBits = 32;
  8. char Acao;
  9. IRsend irsend;
  10. //----------------------------
  11. void setup()
  12. {
  13.   Serial.begin(9600);
  14. }
  15. //----------------------------
  16. void loop()
  17. {
  18.   if (Serial.available() > 0)
  19.   {
  20.     Acao = Serial.read();
  21.     if (Acao == '1')
  22.     {
  23.       IRcode = 0xB24D7B84;
  24.       Serial.println(Acao);
  25.     }
  26.     if (Acao == '2')
  27.     {
  28.       IRcode = 0xB24DBF40;
  29.       Serial.println(Acao);
  30.     }
  31.     irsend.sendNEC(IRcode, numBits);
  32.     delay(40);
  33.   }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement