that_one_nigga_you_k

sending

Nov 7th, 2018
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.01 KB | None | 0 0
  1. //AC remote control signal sending, the signal is this huge array. controle remoto de ar condicionado, o sinal é o array
  2. #include <IRremote.h>
  3.  
  4. IRsend irsend;
  5.  
  6. void setup()
  7. {
  8.  
  9. }
  10.  
  11. void loop() {
  12.   int khz = 38; // 38kHz carrier frequency for the NEC protocol
  13.   unsigned int irSignal[73] {8976, 4432, 596, 516, 12, 8, 580, 516, 608, 516, 596, 528, 588, 516, 608, 516, 596, 532, 584, 520, 604, 1640, 588, 1640, 596, 1632, 608, 1644, 584, 1640, 600, 1632, 604, 516, 600, 1632, 604, 1644, 584, 1644, 596, 528, 584, 520, 604, 516, 600, 528, 584, 520, 608, 516, 596, 528, 588, 516, 608, 1640, 584, 1644, 596, 1632, 608, 1640, 588, 1640, 596, 1632, 608, 40740, 8980, 2200, 588}; // essa string enorme é o sinal, e só vai positivo
  14.  
  15.   irsend.sendRaw(irSignal, sizeof(irSignal) / sizeof(irSignal[0]), khz); //Note the approach used to automatically calculate the size of the array. aqui você chama ela como um comando qualquer
  16.  
  17.   delay(5000); //In this example, the signal will be repeated every 5 seconds, approximately.
  18. }
Add Comment
Please, Sign In to add comment